• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CFSocketSetAddress failing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFSocketSetAddress failing


  • Subject: Re: CFSocketSetAddress failing
  • From: Tomas Franzén <email@hidden>
  • Date: Mon, 26 Sep 2005 01:30:16 +0200

On Sep 26, 2005, at 01:11, Bryan Christianson wrote:
I'm not sure how to do this in CFSocket. Using BSD sockets (the underlying implementation) you would set the socket options SO_REUSEADDR  before binding the endpoint.
error = setsockopt(mSocket, SOL_SOCKET, SO_REUSEADDR, sa, sizeof(struct sockaddr_in));

Bryan - thank you!
That worked perfectly. I simply acquired the native socket handle with CFSocketGetNative and used your code on it.

Thanks again,

Tomas Franzén

Lighthead Software

http://www.lightheadsw.com/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >CFSocketSetAddress failing (From: Tomas Franzén <email@hidden>)

  • Prev by Date: CFSocketSetAddress failing
  • Next by Date: Re: choosing a network port
  • Previous by thread: CFSocketSetAddress failing
  • Next by thread: netstat & port scanning
  • Index(es):
    • Date
    • Thread