• 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: Not getting socket connected notification from NSFileHandle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Not getting socket connected notification from NSFileHandle (From: Christian Hansson <email@hidden>)

  • Prev by Date: MEETING: Chicago - Tuesday, January 4th
  • Next by Date: Re: Cocoa Bindings - nondebuggable, non-obvious, procedural ???
  • Previous by thread: Not getting socket connected notification from NSFileHandle
  • Next by thread: Localization + NSGlobalDomain + AppleMeasurementUnits?
  • Index(es):
    • Date
    • Thread