comp.lang.ada
 help / color / mirror / Atom feed
From: "markp" <markwork66@yahoo.com>
Subject: Re: Sending Variable Length Messages with GNAT.Sockets
Date: 9 May 2005 07:51:23 -0700
Date: 2005-05-09T07:51:23-07:00	[thread overview]
Message-ID: <1115650283.330746.109740@f14g2000cwb.googlegroups.com> (raw)
In-Reply-To: <nospam-82D230.10301509052005@news-rdr-02.ohiordc.rr.com>

Thanks John.

I still have a fundamental problem. I am working on legacy code in
which data is defined in records (or arrays of records) which are sent
in variable lengths. We use address, byte count to send the exact
number of bytes. Using Streams, it seems they type has to be of
Stream_element_Array. The only way I can see to send/receive these
"variable" messages is to first read our message header which contains
the number of bytes in the message. Then, create a Stream_Element_Array
of the exact size for the next read. Then, do an unchecked conversion
or a copy bytes routine to get the data into my data type for
processing. Does this sound correct?

Lastly, using the 'Read function on streams, am I guaranteed to block
until I receive all bytes?

Thanks,

Mark




  reply	other threads:[~2005-05-09 14:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-09 10:11 Sending Variable Length Messages with GNAT.Sockets markp
2005-05-09 10:39 ` Adrien Plisson
2005-05-09 11:19   ` markp
2005-05-09 11:50     ` Adrien Plisson
2005-05-09 14:30     ` John B. Matthews
2005-05-09 14:51       ` markp [this message]
2005-05-09 18:49         ` Adrien Plisson
2005-05-09 19:16         ` Simon Wright
2005-05-10 15:08           ` markp
2005-05-10 20:34           ` Simon Wright
2005-05-11 13:19             ` Marc A. Criley
2005-05-11 17:14               ` tmoran
2005-05-11 21:05               ` Simon Wright
2005-05-12 10:24                 ` Jacob Sparre Andersen
2005-05-14 11:12                   ` Simon Wright
2005-05-09 11:19   ` Jeff C
2005-05-09 11:35     ` markp
2005-05-09 11:57     ` Adrien Plisson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox