Yeah well, I am way ahead of you here Dennis.
I have an app that it already communicating via TCP/IP fine, but it is
passing strings....as it is a proto type.
I now want to step it up a notch, and start getting some structure to the
way things happen, and thought a record structure is one of the best ways of
adding structure to data. (kind of)

I am using strings in my records, but I guess I can change it to a PChar.

so how do I treat it as a memory block ?

Thanks, Jeremy Coulter
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Dennis Chuah
> Sent: Tuesday, April 13, 1999 22:10
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Passing record structures
>
>
>
> 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
>


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to