Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jan : Re: Open a TCP Socket

www.cryer.info
Managed Newsgroup Archive

Re: Open a TCP Socket

Subject:Re: Open a TCP Socket
Posted by:"Kim Jensen" (k..@comcasystems.com)
Date:Thu, 31 Jan 2008 20:00:13

Thanks for all the information and the IdTCPClient1.IOHandler.

>> According to the instruction I just have to send ASCII strings to
>> the controller and I will receive ASCII strings back.
>
> But in what format exactly?  What do the instructions actually say?
> ReadLn() may or may not be the correct method to do, depending on the
> actual format of the strings.

The only thing the instruction says "You simply send an ASCII string to the
controller followed by a carriage return and line feed. The Controller will
either respons with a ' : ' or a ' ? ' . A colon means that the command was
received correctly, a queastion mark indicates an error with the command
sent to the controller. Send the command TC1 and it will response with the
reason."
If I use telnet and send the command ID then I will get 6 lines back and
then a new line with the : and the cursor flashing behind it. So it looks
like I receive a CRLF before the :
I need to read the respons until I either receive a : or ?
Could I use ReadChar and stop reading when I get either the : or ?

Thanks,
Kim

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive