| Dart Home | PowerTCP Server for ActiveX | Custom Development | Reply | PowerTCP Server for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Server for ActiveX Topic: 10053 error after cable unplugged |
| sentera From: Berkeley, CA USA Posts: 1 Member Since: 11/17/05 |
posted November 17, 2005 2:23 PM Not sure if this makes any sense, but here is the question: Is it possible to prevent the tcp control (child of a listening server object, which listen to a given port number) from closing a connection when a cable unplugged error is generated by the system (XP OS), so to make it (the TCP control) wait till the cable or wireless connection is plugged back in? The application in question is a data stream that must be able to recover from data connectivity blockage without losing any bytes. We simulate the wireless outage by plugging the cable off (which I am not sure if it is the same as losing wireless line of sight, but that's the best next thing we can do). Currently the TCP control closes the connection some 6 seconds after the cable has been unplugged. The problem is that the client (third party) finds out about the closed connection only when we plug the cable back. For some reason ... the client loses the data that it sent during the ~6 seconds elapsed between unplugging the cable and the 10053 error thrown by the TCP control. All other data sent by the client to the server after the 10053 error are recovered. The client keeps trying reopening a connection to the server as soon it knows the previous one was dropped. It buffers all the data packets that were not a acknowledged during the previous connection. Unfortunately it seems that those ~6 seconds of data are not marked as not acknowledged and get lost ... at least this is what I have to believe. At the moment when the 10053 error is thrown (or just before it), the SendBufferCount value is of about 50 bytes (variating randomly between 0 and 100). So, the data that get lost are not in the queue of the TCP control when it gets closed. I suspect that when the cable is reconnected the client receives notification that the socket on the server has been closed and so all the not acknowledged data packet linked to this socket are marked as to be dropped even though they were not acknowledged. The ones that were sent after the error are instead sent to the new connection as soon as it is reconnected. I unfortunately have no way to change the aboive schemes (I wish I did!), if this was the case. The above question is the next thing I could think of: can I somehow stop the tcp control from closing a connection even when an error condition has happened? Thanks for your help Paolo |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted November 18, 2005 9:27 AM No, there would be no way to do that. Once the cable is pulled and the system detects it, the connection is gone. |
| Reply | PowerTCP Server for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|