delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/08/17/13:02:41

X-Spam-Check-By: sourceware.org
Date: Thu, 17 Aug 2006 12:02:42 -0500
From: Brian Ford <Brian DOT Ford AT flightsafety DOT com>
Reply-To: cygwin AT cygwin DOT com
cc: cygwin AT cygwin DOT com
Subject: RE: Cygwin 1.5.18: Problem using setsockopt() for multicast
In-Reply-To: <Pine.LNX.4.21.0608171823190.27570-100000@aass.oru.se>
Message-ID: <Pine.CYG.4.58.0608171200170.2408@PC1163-8460-XP.flightsafety.com>
References: <Pine DOT LNX DOT 4 DOT 21 DOT 0608171823190 DOT 27570-100000 AT aass DOT oru DOT se>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Thu, 17 Aug 2006, Alessandro Saffiotti wrote:
> On Thu, 17 Aug 2006, Brian Ford wrote:
> > Oh yeah, you must call the setsockopt below after the bind on windows.
> > Search MSDN for why.
>
> Thanks a lot, this actually fixed my problem.

You're welcome.  Sorry for the initial noise.

> In case it may help someone else: I also need to make the socket
> reusable by
>
>  setsockopt(tcp_broadcast_receiver, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)

I've never had to do that, so it must be an issue with your code that
requires it to be reusable.

> and I have found that this, contrary to the IP_ADD_MEMBERSHIP case,
> must be called BEFORE I bind the socket!

Um, that makes sense, doesn't it?

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...

.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019