Re: Not getting socket connected notification from NSFileHandle
Re: Not getting socket connected notification from NSFileHandle
- Subject: Re: Not getting socket connected notification from NSFileHandle
- From: Douglas Davidson <email@hidden>
- Date: Mon, 3 Jan 2005 08:30:30 -0800
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:
This email sent to email@hidden