Re: Sockets and Network Disconnect?
Re: Sockets and Network Disconnect?
- Subject: Re: Sockets and Network Disconnect?
- From: Quinn <email@hidden>
- Date: Fri, 1 Aug 2008 09:58:23 +0100
At 19:07 -0400 31/7/08, Karl Moskowski wrote:
That's right - I am using a custom protocol, FTP-inspired I'm told.
Because of the somewhat convoluted sequence of packets, plus the
requirement that I pause & restart transfers, managing AsyncSocket's
state between delegate calls just got to be too much.
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.
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>
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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