X-Spam-Check-By: sourceware.org
Date: Thu, 17 Aug 2006 18:31:17 +0200 (CEST)
From: Alessandro Saffiotti <asaffio@aass.oru.se>
To: cygwin@cygwin.com
Subject: RE: Cygwin 1.5.18: Problem using setsockopt() for multicast
In-Reply-To: <Pine.CYG.4.58.0608170853330.2408@PC1163-8460-XP.flightsafety.com>
Message-ID: <Pine.LNX.4.21.0608171823190.27570-100000@aass.oru.se>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-1.6 (brevduva.oru.se [130.243.97.7]); Thu, 17 Aug 2006 18:32:25 +0200 (MEST)
X-oru-MailScanner: Found to be clean
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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.

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)

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

Thanks again!

  Alessandro







--
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/

