> Could use ThrdServer example, the problem was solved with > "WSocketServer1.Banner: ='';" now I can not receive data, by > setting longer just LINEMODE = FALSE, and after a few connections, > does not enter the event "OnDataAvailable" when LINEMODE = TRUE event > "OnDataAvailable" is never triggered
OnDataAvailable is identical in all ICS components, does not matter which client or server demos you look at. You have not told us what protocol your POS terminals are using, specifically whether it is ASCII line oriented or binary packets, and LINEMODE=TRUE will only work with the former. In practice, I rarely use LINEMODE=true even for line oriented protocols, because sometimes those lines may be thousands of characters long and exceed the buffers. I usually use Receive or ReceiveFrom to accept data into a buffer, and then loop through the buffer character by character checking for line endings and other control characters and writing a simple string for further processing. The loop can check for long lines and have a timeout if data stops half way through a line. For an example look at procedure TMagIpLog.SocketDataAvailable in the component I recommended you use for testing yesterday, you are simply trying to reinvent stuff that others have done already. Angus -- 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