[Bluez-devel] Blocking connect(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM) => EINPROGRESS

Olivier Le Pogam
2007-10-22T08:21:50Z

Hi,

I am trying to perform RFCOMM connection to a mobile phone thanks to a
blocking "connect(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)" (Blocking is
the only way for me to get a "Connection Refused" return status !), and if
the phone is still asking for the authorization when the connect times out,
the connect and leaves with a EINPROGRESS status.

Could you please tell me :
- If there is a way to extend the blocking "connect" timeout ?
- When a connect exists with a "EINPROGRESS" status, does it make sense to
try another "connect" on the same socket without doing a complete retry
(close / socket / bind / connect) ?

Thanks a lot,
Oli