> I consider it should be best solution to wait for full record in > OnDataAvailable procedure, to do a new record and send some USER > message. Am I right?
I think so. Remember that you may receive all or part of the data that follow the header and possibly also the next header. Be careful when assembling incomming data and then extracting the information you need. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be ----- Original Message ----- From: "Igor Pokorny" <[EMAIL PROTECTED]> To: <twsocket@elists.org> Sent: Monday, August 15, 2005 6:50 PM Subject: Re: [twsocket] Twsocketserver > Well, I would like to thank to all of you tried to help me. I have found > the way how to manage a buffer in TWSchat1.pas (Thank you, Francois). > BTW I would prefer to use Linemode too but I am not allowed to write TCP > client by myself, it's a part of delivered software. > > FYI, every packet i obtain to server has a header: > > THeader = record > Command:CARDINAL; > Length :CARDINAL; > ChannelFrom:cardinal; > ChannelTo:cardinal; > ChannnelType:CARDINAL; > end; > > Command can be "read", "write" or "notify". > Length is probably clear :-) > The client application uses channels for data. Channels can be any type > (bit, byte, word, integer, float, etc. > The group of channels has to be the same type, if the type is "string" > there is allowed to be one channel in the header only. > > If the command is "read" the rest of packet (or some nexts) keeps values > of announced channels, if "write" the client send the header only and is > awaiting values of demanding channels (together with the header) and if > command is "notify" it means channels will be changed in short time and > it's up to you what to do (it's mean "to be prepared to deliver new > values ASAP to the second side"}. > > I consider it should be best solution to wait for full record in > OnDataAvailable procedure, to do a new record and send some USER > message. Am I right? > > > Thank again > > Igor -- 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