RFCOMM Channel Read/Write timeout strategy?
RFCOMM Channel Read/Write timeout strategy?
- Subject: RFCOMM Channel Read/Write timeout strategy?
- From: Joseph Kelly <email@hidden>
- Date: Thu, 29 Sep 2005 16:09:31 -0700
Any idea on how to perform reads and writes with a timeout?
I was thinking of something like:
bool bTimeout = true;
[channel writeAsync... refcon:&bTimeout]
[currentThread sleep:timeout...]
if (bTimeout)
handleTimeoutError...
...
And in the async notification delegate:
if (status == okay)
*refcon = false; // i.e. flag that data was got okay
[currentThread wake]
I'm not sure if this is even possible or advisable (I've never used
Cocoa threading...)
Any ideas, including any timing guarantees made by Apple or Bluetooth
or RFCOMM? My timing constraints tend to be "as real time as
possible"... once again, is there a lower level api? ;-)
joe
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden