• 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: Sockets and Network Disconnect?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sockets and Network Disconnect?


  • Subject: Re: Sockets and Network Disconnect?
  • From: Karl Moskowski <email@hidden>
  • Date: Fri, 1 Aug 2008 07:36:15 -0400


On 1-Aug-08, at 5:01 AM, Quinn wrote:

I'm kinda confused.  If you're running this as an NSOperation, you
have to deal with asynchronicity.  If you block waiting for the
network while running in an NSOperation, things are going to get ugly.

My understanding is that NSOperationQueue gives each NSOperation its own thread automatically. If that doesn't happen, then I can't explain how the UI stays responsive while the NSOperation is active. :)


If the protocol is that convoluted, why not put it in a thread?  That
way can get nice, easy-to-understand, sequential code.  OTOH, you
will need some way of getting out of blocking calls.  The
SocketCancel sample shows one technique for that.

<http://developer.apple.com/samplecode/SocketCancel/index.html>


I'll take a look at thatm and the CFStream APIs you mentioned in your other reply. Thanks.

----
Karl Moskowski <email@hidden>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Sockets and Network Disconnect?
      • From: Quinn <email@hidden>
  • Prev by Date: Re: Sockets and Network Disconnect?
  • Next by Date: Re: Sockets and Network Disconnect?
  • Previous by thread: Re: Sockets and Network Disconnect?
  • Next by thread: Re: Sockets and Network Disconnect?
  • Index(es):
    • Date
    • Thread