Hello Clément, > I searched some examples, but most of them use LineMode and LineLimit. I'm > afraid > that's not an option.
Wy is that not an option ? What is the problem with it ? Just terminate your data with a charcter that cannot be in the data itself and your whole problem is solved. > // here I expect "Len" <= BufSize. If it's equal than "may be" there's > more to > // read. How can I be sure? Does ICS have some internal flag ? You cannot. ICS also cannot have a flag. Data can be somwhere on the way or send may send some more data. winsock cannot know what sender wants. > if Len = 0 then begin > // Something happened!! What? Winsock does not like to let us receive data, so exit the event. > if Len=-1 then begin > // Seems to be the end of a long string. Once len = -1, can No it is not a long string. -1 is an error. just exit the event. > // Now the problem: > // I must cache the received zBuf > FRcvBuf := FRcvBuf+ string(zBuf); > // If we read all the data, we display it If you have a problem with linemode, the send first the length of the data you want to send. then receiver has length and can concatenate all data packets until it is same as the length. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz -- 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