Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jan : Re: Open a TCP Socket
| Subject: | Re: Open a TCP Socket |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Mon, 28 Jan 2008 17:21:45 |
"Kim Jensen" <kim@comcasystems.com> wrote in message
news:479e7366@newsgroups.borland.com...
> I have a project that require me to open a TCP Socket to a Hardware
> controller
Does the controller have a server socket that you are supposed to connect a
client socket to? Or are you supposed to run the server socket that the
controller will connect its client to?
> and communicate with the controler by sending an ACSIII string
> and read the return string.
Assuming you are supposed to connect a client to the controller's server,
then simply use a TIdTCPClient component. Set its Host nd Port properties,
call Connect(), then Write() or WriteLn(). As for reading the reply back,
that depends on what the controller actually sends back. It may be as
simple as calling ReadString() or ReadLn().
Gambit