Writing asynchronously on a stream in cocoa
Posted
by Richard Ibarra
on Stack Overflow
See other posts from Stack Overflow
or by Richard Ibarra
Published on 2010-02-19T15:58:34Z
Indexed on
2010/03/26
19:03 UTC
Read the original article
Hit count: 300
Hi folks
I have been trying to find any way for writing asynchronously on a stream in Cocoa.
I have a set of events in my applications which will try to send data through the socket but i can't be blocked during this transmission due to design terms.
I have tried setting a delegate on the output stream and check the event NSStreamEventHasSpaceAvailable but I don't know how this can be combined with the events that put data into the stream.
Is there anyway for doing that? I thought using NSThread but I guess there is a better option.
Cheers
© Stack Overflow or respective owner