aaronk Well-Known Member Licensed User Longtime User Feb 7, 2015 #1 Hi, Just wondering when making a connection to a TCP socket, what does the TimeOut do? Lets say I set the timeout to 5000. Code: Socket1.Initialize("Socket1") Socket1.Connect("192.168.0.5" , 1234, 5000) Does that mean it will try and connect and if it fails to connect in 5 seconds it will timeout and fail to login or does it mean that if no data is sent for longer then 5 seconds it will close the connection ?
Hi, Just wondering when making a connection to a TCP socket, what does the TimeOut do? Lets say I set the timeout to 5000. Code: Socket1.Initialize("Socket1") Socket1.Connect("192.168.0.5" , 1234, 5000) Does that mean it will try and connect and if it fails to connect in 5 seconds it will timeout and fail to login or does it mean that if no data is sent for longer then 5 seconds it will close the connection ?
giga Well-Known Member Licensed User Longtime User Feb 7, 2015 #2 I believe it says how long the application is prepared to wait for all of the packet-level timeouts, retransmissions, etc to succeed Upvote 0
I believe it says how long the application is prepared to wait for all of the packet-level timeouts, retransmissions, etc to succeed
aaronk Well-Known Member Licensed User Longtime User Feb 8, 2015 #3 So does this mean if I make connection to the device and it fails to connect it will timeout after the time I set or, if I send a command and it takes longer then the timeout time to get through it will then disconnect ? Upvote 0
So does this mean if I make connection to the device and it fails to connect it will timeout after the time I set or, if I send a command and it takes longer then the timeout time to get through it will then disconnect ?
Erel B4X founder Staff member Licensed User Longtime User Feb 8, 2015 #4 This value only affects the connection process. There could be all kinds of connection errors. In some cases the connection will fail immediately. However there are other cases when the connection can be very slow (or even never end). The purpose of the timeout is to prevent very slow connections. Once connected this value has no effect. Upvote 0
This value only affects the connection process. There could be all kinds of connection errors. In some cases the connection will fail immediately. However there are other cases when the connection can be very slow (or even never end). The purpose of the timeout is to prevent very slow connections. Once connected this value has no effect.