Which send and recieve methods to use?

Giganews Newsgroups
Subject: Which send and recieve methods to use?
Posted by:  John Small (jo…@small8242.fsnet.co.uk)
Date: Mon, 29 Sep 2003

Indy provides a wide variety of send and receive methods for different
purposes and for a novice it can be a little hard to work out which are the
right ones to use.  So I'm asking the experts.

The program needs to send and receive XML packets, some of them are quite
large so using line based send/receive isn't viable as it'll hit the end of
the line. The client sends a command like "get territories" and the server
reads a tree of all territories packages them into XML and sends them back.
The client then takes the XML puts it into objects and displays it.

There's actually much more to it than that, but if I can get that bit
working I think everything else will be OK.

I can send a receive simple command response pairs, but when I try the full
XML packet I get "line too long" or some corrupted data. So which methods do
I use on the server to send stuff back from within a command handler, and
which do I use on the client?

Any ideas?


John Small