Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jun : Using TIdTCPClient
| Subject: | Using TIdTCPClient |
| Posted by: | "Mikael Lenfors" (mika..@lenfors.se) |
| Date: | Sat, 7 Jun 2008 11:17:49 |
Hello!
I'm about to communicate with an external device over TCP. I am supposed to
send a string of characters and the device will answer with another string
of characters. What methods in the TIdTCPClient am I supposed to use? Is it
the right component in the first place?
I found several methods to send e.g. IdTCPClient.IOHandler.Write and
IdTCPClient.Socket.Write. A'm I supposed to use any of these? Is it possible
to have timeouts on them? If for example the network cable is unplugged?
How should I implemet the recieve? I also here need a timeout if no
characters are returned!
I'm using D2007 and Indy 10. Looked everywhere for examples but couldn't
find any relevant documents...
Regards, Mikael