ServerSocket - OnClientRead event.Posted by Bill Adams on April 15, 2002 at 23:51:20: I've been reading up on some examples of how to receive data from the connection. Now, here's a snippet from one of the examples i'm looking at: var MsgLen : integer; Buf : string; LenReceived: integer; begin MsgLen := Socket.ReceiveLength; SetLength( Buf, MsgLen ); LenReceived := Socket.ReceiveBuf( Buf[1], MsgLen ); Buf := Copy( Buf, 1, LenReceived ); Could someone explain what's going on here? I'm slightly confuse as to what's happening and i'm fairly new to Delphi so a simple explanation would be great.
|
|