Re: Get text/data from a tcp port..

[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]

Posted by Shorty on January 03, 2002 at 10:04:43:

In Reply to: Get text/data from a tcp port.. posted by p12174 Doug on November 21, 2001 at 05:40:41:

The text comeing in would trigger the NameofSocket.OnRead event, and in the procedure for that there are 2 entries that have the text that the server has sent to you

ReceiveText: string
ReceiveBuf(var Buf; Count: Integer): Integer;

i have no ideas how to use buffers and stuff so just use ReceiveText like
var SockText: string;
SockText := Socket.ReceiveText

but remember that if u do something with Socket.ReceiveText once it will clear it from memory (took me a while to figure that out) so put it into a string to use for whatever purposes unless u only need it once

for u it would b like (in the OnRead event)


Related Articles and Replies

[ Related Articles and Replies ] [ DelphiLand Discussion Forum ]