> sorry, actually it's this
>
> procedure TForm1.WSocket2DataAvailable(Sender: TObject; ErrCode: Word);
> Var a: string;
> begin
> a:= WSocket2.ReceiveStr;
> // if length(a) = 0 then Exit;
> Inc(rec,1);
> caption:= 'Received packets = '+inttostr(rec);
> memo1.lines.add('Data: '+a);
> end;
You have better control when using Receive instead of ReceiveStr.
You can make distinction between Receive returning -1 or 0 bytes.
--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
--
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