rafaelrgl
asked on
WHAT'S THE BEST: IDTCPCLIENT, IDTCPSERVER === OR === TCPCLIENT, TCPSERVER
I WOULD LIKE TO KNOW:
WHAT'S THE DIFERENCE? IDTCPCLIENT, IDTCPSERVER ====== TCPCLIENT, TCPSERVER
WHAT'S THE DIFERENCE? IDTCPCLIENT, IDTCPSERVER ====== TCPCLIENT, TCPSERVER
ASKER
TCPClient and TCPServer is from Borland Internet Components ( dclnet70.bpl )
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Indy is blocking, ie. you say
s := IdTCPClient1.IOHandler.Rea
showmessage(s);
the showmessage line will not occur until indy has received the string
if, for example you were using a non-blocking componet set such as Fracois Piette's ICS
you would use the OnDataAvailable event, and use a buffer, and showthemessage once you had received an end of string delimiter (e.g. #1 or #13#10)
(you can change it to "linemode" to make this as easy as indy)
The most popular TCP components are (in no particular order)
Indy's TidTCPClient, TidTCPServer
ICS TWSocket, TWSocketServer
Delphi's native TSocket and TServerSocket