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: Not getting socket connected notification from NSFileHandle




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

This email sent to email@hidden
References: 
 >Not getting socket connected notification from NSFileHandle (From: Christian Hansson <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.