Robert Haditama wrote: >Hi, >I am using threaded twsocketserver, and the logic is >similar to ThrdSrv (the example application). There >are about 30 clients connected, and send periodically >1 message until in total about 100 messages. For every >message, the server should retrieve, update, or insert >some data to oracle database. After that, it will send >a reply message to the client. The problem is, >sometimes the message that is received in >OnClientDataAvailable event is not received correctly. >Eg. Client 1 send the 97th message, it will received >and processed correctly. But at 98th message, seem >that it received and processed the 97th message (the >message is exactly different). But after Client 1, >disconnect, socket is closed, reconnect again, and >send the 98th message, it will get it right. This >problem is not happenning everytime, and not every >client have it. > > Make sure that you never call Application.ProcessMessages (Or Showmessage()) from your OnClientDataAvailable handler. Also, remember that if you send two messages from your client:
Hi there The server may receive them as: Hi there Or it may receive them as: Hithere Or it may receive them as: H i t h ere It is up to you to write a protocol that allows you to separate different messages out. Cheers, Nicholas Sherlock -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be