Wireless Communication Library Support Forum
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
Wireless Communication Library Support Forum
»
Common
»
Common
»
Cancel pending connection before timeout
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Cancel pending connection before timeout (Read 26228 times)
jotde
Guest
Cancel pending connection before timeout
«
on:
May 15, 2014, 01:34:17 PM »
Is there any way to cancel pending connection for wclClient before specified timeout occurs?
I have tried wclClient::Disconnect but it does not have any effects (probably because the client is not connected yet).
Logged
Mike Petrichenko
Bluetooth Framework Developer
Administrator
Hero Member
Posts: 3675
Karma: 1000
Re: Cancel pending connection before timeout
«
Reply #1 on:
May 15, 2014, 02:45:56 PM »
Hello,
Disconnect terminates pending connection. If OnConnect event fired then OnDisconnect will fire as well. If Onconnect event has not been fired yet then OnDisconnect will not fire.
Logged
Bluetooth Framework
IrDA Framework
Serial Framework
WiFi Framework
jotde
Guest
Re: Cancel pending connection before timeout
«
Reply #2 on:
May 16, 2014, 09:52:16 AM »
Thanks, I found out that due to programming error I didn't called disconnect at all - now it works as expected
I have noticed that timeout duration set with SetConnectTimeout is only valid when the remote device is in range (i.e. is powered on and responding). When I switch off the device the connection timeouts after approximately 3 seconds regardless of the set connect timeout value (I have verified that client has the timeout set to 10 seconds using the GetConnectTimeout). Could you confirm it?
Logged
Mike Petrichenko
Bluetooth Framework Developer
Administrator
Hero Member
Posts: 3675
Karma: 1000
Re: Cancel pending connection before timeout
«
Reply #3 on:
May 16, 2014, 12:04:19 PM »
Yes, Timeout also controlled by stack. The timeout app can control is just a "recomendation" for stack. It may varies in about 3-5 seconds.
Logged
Bluetooth Framework
IrDA Framework
Serial Framework
WiFi Framework
Print
Pages: [
1
]
Go Up
« previous
next »
Wireless Communication Library Support Forum
»
Common
»
Common
»
Cancel pending connection before timeout
Sitemap
1
2
3
4
5
6
7