> Hi Wilfried, > > The problem is present because I test of data in the sent machine and the > data not is the same in Receive machine. > If I send 30Kb of data, in the other machine receive 7Kb only; and I don't > know what is the problem. > Send you part of code of application, but I know that information is sent > and not all receive. > Thanks again. > Bye. > Juan Pablo Franco
> SENT MACHINE > overlaySocket.SendStr(Msg); > > > RECEIVE MACHINE: > procedure TFVisor.overlayListenDataAvailable(Sender: TObject; ErrCode: Word); > var > Buffer : array [0..50000] of char; > Src : TSockAddrIn; > Len, SrcLen: Integer; > s:string; > begin > overlayListen.BufSize := 16384; > SrcLen := SizeOf(Src); > overlayListen.Receive(@Buffer, SizeOf(Buffer)); > s:=StrPas(Buffer); > > processMessage(s); > ... > end; This is a normal way. The OnDataAvailable event doesn't mean you have received *all* the data, but some data. You should have somewhere - before receiving, or while receiving - some boundaries for your data (cf the boundary method used for MIME data). hence, while you don't have received all of your data, you store the newly received data into a buffer. When you have received/reconstructed all of your data, manage it, and start again, if you have to receive some more data. HTH, best regards, -- Guillaume MAISON - [EMAIL PROTECTED] 83, Cours Victor Hugo 47000 AGEN Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50 e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com -- 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
