Jeremy,
Hi.
> I am doing a little bit of experimenting, and wandered if it is possible
to pass record stuctures across TCP/IP connections ?
> if so how do you go about it ?? does anyone have any examples or know
where to look ??
There are several ways to do this. I guess the easiest is to use the socket
components that come with Delphi. They are quite easy to get going. Treat
the record as a block of memory (should work as long as you do not have
pointer or string references in your record). Once you have connected, you
ought to be able to pass a block of data from client to server and vice
versa.
For us, we use HTTP (which uses TCP/IP) - mainly because our apps need to
communicate to a web server and HTTP seems to be the best option. The
record gets converted into values that get posted as a form. This has the
added advantage that it is easy to debug - because everything gets converted
into text.
What I think you will need to do however, is to determine a protocol in
which your apps are to communicate. Draw up a state diagram, taking care
not to have states that you cannot get out of. You will also need to
consider what happens when the communications fails - how to gracefully
handle errors. I suggest you plan this even before you start coding.
Dennis.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz