Magno Lima wrote: > Hi Wilfried, > > Yes, thank you! What I mean was exactly that: > > Srv.Clients[i].SendStr('Hello again'#13#10); > > By use Clients[n] I was able to send back :) ... > > Now, I have a lot of data to send from a side to other, I remade my > program to work with TCP instead UDP to see if it works. I am trying to > transmit video over ip. I can get the video stream in a pure bytes > sequence, something like GetVideoData() that is a pointer to the memory > and a GetVideoDataSize() that is the length of data. The other side > (client) I have to receive and reprocess the data again, my doubt comes > when defining the buffer size. I declared a Buffer:array[0..n] of byte, > in my case n = 9128 bytes in length.
First you don't need a send buffer. Send your data is chunks directly from the stream, in OnDataSent send next chunk and so on, until you reach the end of stream. You can send total length of your stream in the first bytes of the first chunk so that the receiver knows about data length. Or you could use a small record with i.e. TotalLenght, NumOfChunks etc.. > Will the TCP stack correctly send > this piece of data to the other side? Of course! > Will this affect the buffer size of > the own TCP stack defined to TWSocketServer component? Sorry, I do not understand the question, probably it is too early in the morning for me. Arno Garrels -- 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