Non blocking sockets?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Non blocking sockets?

Sean Malloy-11
Have I missed the point of the Sockets 2 package?

There is no equivelent of the old Socket receiveByteArrayPartial: method?


Reply | Threaded
Open this post in threaded view
|

Re: Non blocking sockets?

Sean Malloy-11
> Have I missed the point of the Sockets 2 package?
>
> There is no equivelent of the old Socket receiveByteArrayPartial: method?

Got it.

Using a combination of checking hasInput, and then calling
receiveSome:count:startingAt: seems to work.

It blocks if there is 0 input. So a check for hasInput before the call does
the trick.

On the whole, Sockets2 package much nicer.