Skip navigation.
 
mlRe: Anyone used btlsocket framework?
FROM : Jens Alfke
DATE : Sat May 10 21:11:07 2008

On 10 May '08, at 11:59 AM, Wade Tregaskis wrote:

> I haven't used it directly, but I did notice when looking at it that 
> it seems to rely on you polling it... that's terrible, given you can 
> setup a socket as a runloop source very easily and it operates very 
> efficiently.


By Jove, you're right! From BTLSocketManager:

//! \brief Updates the sockets.
//!
//! This method should be called often. Managed sockets will not 
recieve data or
//! finish pending connections until this method is called. NSTimer 
can be used
//! to call this method on a regular basis.

- (void)select

That is just absurd. It might have been excusable ten years ago in the 
classic OS, when threading and asynchrony were so difficult, but as 
you point out, you pretty much have to go out of your way to be this 
badly-behaved on Mac OS X.

Let us never speak of it again :-/

Anyone got a good socket framework to recommend? (I realize it's not 
that hard to roll your own with NSStreams, as shown in CocoaSockets, 
but a framework with a few more bells & whistles would be nice.)

—Jens

Related mailsAuthorDate
mlAnyone used btlsocket framework? Jens Alfke May 10, 20:23
mlRe: Anyone used btlsocket framework? Wade Tregaskis May 10, 20:59
mlRe: Anyone used btlsocket framework? Jens Alfke May 10, 21:11
mlRe: Anyone used btlsocket framework? Robert Claeson May 10, 21:18
mlRe: Anyone used btlsocket framework? Michael Gardner May 10, 21:35
mlRe: Anyone used btlsocket framework? Ricky Sharp May 11, 00:24