Re: RFCOMM Event listener using C
On Thursday, January 23, 2003, at 01:16 AM, Tommy Gunnarsson wrote: Hello. I'm trying to use the RFCOMM event listener with pure C but I have some problems. I'm using this C API:s to open a RFCOMM Channel: extern IOReturn IOBluetoothDeviceOpenRFCOMMChannel(...); extern IOReturn IOBluetoothRFCOMMChannelRegisterIncomingEventListener(...); But how can I use the listener? I tried to use the following example but I can't get it working. How should I make the event handling in Carbon? What does the IOBluetoothRFCOMMChannelIncomingEventListener do and how should I use it? Is it possible to use this API:s in pure C or must this be done in the objC language? I'm little confused right now. I hope someone with more knowledge has time to give a guide line. /Tommy You need to run a CFRunLoop in the same thread in which you made the calls into the Bluetooth framework. Typically that entails calling CFRunLoopRun() at the end of you main() routine. That provides the event loop and event handling. - Eric _______________________________________________ bluetooth-dev mailing list | bluetooth-dev@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/bluetooth-dev Do not post admin requests to the list. They will be ignored.
participants (1)
-
Eric Brown