Hello, I'm using TSWocket and have the following problem:
One client and one server running on the same PC (localhost, 127.0.0.1) use the socket as medium to transport commands. It normally works as it should but under certain conditions it fails like this: my application has to deal with Bluetooth as well and in my special case here the Toshiba Bluetooth stack. I can detect the remote device, pair it etc. and then my setup wizard willl be finished by the user clicking a button. My application now has to tell the communication part (means the server side of the TWSocket connection) to shut down. it sends him a binary shutdown command and after a short time the client does a shutdown(1) on the socket. The server is bound to a message processing thread and multithreaded is set to true. Binding is done via ThreadAttach in the execute method of the thread. In the error case the server doesn't receive the shutdown command send by the client, but he eventually gets the closure of the socket. Depennding on ym application logic it sort of hangs in the air then. One thought was that the shutdown(1) call of the client sort of overtakes the send call, but a sleep(1000) directly after the send or a 3 sek long message processing loop directly after the send call didn't help, so I'm no longer really convinced that this short time between those two actions is the cause. On the server side I've hooked into OnChangeState but the only thing this one sees in those cases is the latter wsClosed state. But it fails more often in my perception than it works...and my other perception is, that it only happens when the Toshiba stack is involved, but can't easily check this, as this laptop is the only Toshiba Stack device I own. Greetings Markus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be