.NET Components for Mobility

Controlling connect timeout when pairing required...any ideas?

Last post 09-09-2008 11:02 AM by markwhite00. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-09-2008 11:02 AM

    Controlling connect timeout when pairing required...any ideas?

    Hi,

    I'm using BluetoothClient.BeginConnect() / EndConnect() on WinXP to try to control the connect timeout and have a few questions. I'm using the following approach:

    IAsyncResult connectResult = client.BeginConnect()

    connectResult.AsyncWaitHandle.WaitOne(m_connectTimeout, false);

    ...

    What I find is that if a pairing is required and a user does not respond to the pairing request that BeginConnect() completes long before the m_connectTimeout value.

    1) Is there any way to control the timeout that BeginConnect() uses when a pairing request is required?

    2) Irrespective of whether pairing is or is not required, does EndConnect() always have to be called?

    3) Irrespective of whether pairing is or is not required, who is responsible for closing the Stream returned from BluetoothClient.GetStream() when the stream is passed into the ObexWebRequest(Uri, Stream) ctor?

    Thanks,

    -Mark

     

Page 1 of 1 (1 items)
Copyright © 2001-2008 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.