> I looked at the example TcpServ1 and it seems pretty straight forward. I > used that as my model. I do understand that the OnDataAvailable event is > the > one from the instantiated client socket, which is assigned in the > OnClientConnect event of the server socket. But I can not understand why > that event does not trigger when my remote client sends a string. I tried > adjusting the end of line chars, but nothing seems to work. My client > connects, I get the OnClientConnect event. After that I expect to see a > string come in from the remote client and the OnDataAvailable event (of > the > client) to trigger.
Do you have turned LineMode TRUE or FALSE ? First try with FALSE value. In that case you get an OnDataAvailable whatever data your client send. If you turn LineMode to TRUE, then you get OnDataAvailable only when the client has sent a complete line. A line is completed when the end of line character(s) are received (default to CRLF pair). As Wilfried said, no event is triggered if the message pump is not working. If you do a "wait loop" (bad idea anyway), you must call Application.ProcessMessages so that events are processed. Better to avoid wait loop and use events. -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- 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