Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFSocketSetAddress failing



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:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden

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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.