On Jan 2, 2005, at 9:22 AM, Christian Hansson wrote:
I have been using straight BSD sockets for network communication for
quite some time now, and wanted to try and use the 'nicer' way using
the NSFileHandle, however I cannot seem
to get the notification of when a socket as connected, using the code
below, either creating the socket from BSD style C functions, or using
NSSocketPort. I know the notification handler is working since firing
the notification manually (as seen in the commented out code) does
give me the notification. I am sure there is something really stupid I
have overlooked, if anyone could point me in the right direction that
would be more than appareciated.
I can't say exactly what is wrong, but I do have two recommendations:
(1) don't use NSSocketPort for this, that's not what it does; (2) ports
are shorts, so use htons(31415).
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden