Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Mar : How to read data with case insensitive terminator in TIdTCPServer?

www.cryer.info
Managed Newsgroup Archive

How to read data with case insensitive terminator in TIdTCPServer?

Subject:How to read data with case insensitive terminator in TIdTCPServer?
Posted by:"Bo Berglund" (bo.berglu..@telia.com)
Date:Mon, 26 Mar 2007 08:05:44

I understand that the ReadLn method of TIdTCPServer's
AThread.Connection object can read data that have a specified
terminator. In my case the terminator is '</msg>.
But not always...

How can I deal with messages that end in:
</msg> or </MSG> or <msg/> or <MSG/> or <msg />????

And another one:
If the data do not contain the ending sequence when the OnExecute is
fired, but they arrive in a later packet, what remains of the original
data on the second firing of OnExecute if I have done a ReadLn in the
first (without getting anything)???

Replies:

www.cryer.info
Managed Newsgroup Archive