> i give up i searched a lot on how to send memory stream with 
> Command to client i just wanted to send client list from server
> to client

>       Client := TMyclient(Server.Client[J]);
>       if (SL.Count > 0) then
>       begin
>         MS := TMemoryStream.Create;
>         try
>           SL.SaveToStream(MS);

You don't really need to send a memory stream, since you data is
already in a TStringList.  So just use:

      Client.SendStr (SL.Text);

To send a stream, you read part of it into a buffer, and then send that
buffer.  It gets more complicated if the stream is vary large, since
the above version requires ICS to create buffers for all the data
passed, and you would not want to get a 2GByte buffer.  

Angus

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to