Are you using any protocol codec factory?How do you format your bytes/messages before writing them to the socket?
-- Leandro Rodrigo Saad Cruz On Mon, Sep 14, 2009 at 12:52 PM, Sebastian Wagner <[email protected]>wrote: > hi, > > > I have a Client-SocketConnector and Server-SocketAcceptor. So all about > TCP. > I send TCP-Packets with a size of around 1200Bytes but I always receive > Packages with a length of 2048, 4096, 8192, ... > I mark all Packets that I do send with a sequence number before sending => > I > see that packages are missing. > > So some packets are missing and others are much bigger. I guess TCP does > wrap my packages together to have a optimal frame size when send over the > network. > > > How do you deal with this? > Actually it does not make sense to me that I send Packets of one size and > receive something different. > But anyway if this is the way TCP works (or optimizes the throughput) thats > fine ... but the problem is => how do I get my Packets in the same > structure that I've send again? > > What is your strategy for that? Make every packet *exactly* 1024 Bytes and > cut everything again on the Receivers end? > Or am I on the complete wrong lane? > > > thanks, > sebastian > > > -- > Sebastian Wagner > http://www.webbase-design.de > http://openmeetings.googlecode.com > http://www.laszlo-forum.de > [email protected] >
