Zitat von Johan Hedberg <[email protected]>:

> On Wed, Jun 15, 2011, Hendrik Sattler wrote:
>> Hi Johan,
>>
>> Zitat von Johan Hedberg <[email protected]>:
>> >On Wed, Jun 15, 2011, Johan Hedberg wrote:
>> >>On Wed, Jun 15, 2011, Hendrik Sattler wrote:
>> >>> @Johan: Looking at [1], what are the reasons that osso-gwobex is
>> >>> using FdOBEX instead of BtOBEX?
>> >>
>> >>libopenobex is intended to be LGPL, but linking it with libbluetooth
>> >>makes it effectively GPL. Because of this Maemo has never shipped a
>> >>libopenobex with the Bluetooth specific parts compiled in and neither
>> >>does MeeGo (AFAIK; I haven't actually verified this).
>> >>
>> >>Additionally, handling Bluetooth sockets within the application and
>> >>passing them to FdOBEX is quite simple, and we even have GLib wrappers
>> >>like BtIO which make using FdOBEX much more consistent with the rest of
>> >>the BlueZ & obexd code bases than BtOBEX would ever do.
>> >
>> >One more very important reason: BtOBEX uses blocking sockets. This is a
>> >complete no-no for single-threaded processes with an asynchronous
>> >mainloop like bluetoothd or obexd.
>>
>> It might surprise you but using non-blocking sockets with openobex
>> only helps when reading data, the code using a busy-loop for writing
>> full packets in this case! That might not be what you want.
>> This is caused by deficiencies in the openobex state machine. Needs
>> to be addressed at some time...
>>
>> BTW: you can make the BtOBEX socket non-blocking at the right
>> moment, the openobex library (at least latest version) can handle
>> that just fine.
>
> I wasn't actually so much concerned with read/write as with the blocking
> connect() system call. I don't see any support for a non-blocking
> connect in openobex.

You are right, this one is always blocking. Should we change that? The  
easiest would be to add an OBEX_FL_NONBLOCK, just as I did with  
OBEX_FL_CLOEXEC. Or should we default to non-blocking? The write-path  
would need a small patch to make it suck less, then.

At least, it should be on our TODO list. Thanks for mentioning this :-)

HS



------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users

Reply via email to