From: Simon Wright <simon@pushface.org>
Subject: Re: Ada x <whatever> Datagram Sockets
Date: Sun, 10 Feb 2019 17:54:19 +0000
Date: 2019-02-10T17:54:19+00:00 [thread overview]
Message-ID: <ly5ztry1f8.fsf@pushface.org> (raw)
In-Reply-To: q3l8q4$m0l$1@franka.jacob-sparre.dk
"Randy Brukardt" <randy@rrsoftware.com> writes:
> "Simon Wright" <simon@pushface.org> wrote in message
> news:lyef8iy9dj.fsf@pushface.org...
>> "Randy Brukardt" <randy@rrsoftware.com> writes:
>>
>>> Note that Ada 2020 will have a package FIFO_Streams
>>
>> Names are in short supply - but - is there an implication there that
>> streams in general need not be FIFO? (I can just about see that you
>> might have some form of FIFO-within-priority ordering, though that
>> does seem to be a bit of a perversion of the underlying idea)
>
> We tried a lot of names and FIFO was the winner. I'm not sure it is
> very descriptive of what the package actually does.
I called it Memory_Streams, e.g.
https://github.com/simonjwright/coldframe/blob/master/lib/coldframe-memory_streams.ads
The main use was to allow messages for UDP streams to be prepared
simply, as discussed above, so the typical usage was
declare
a Memory_Stream instance of the appropriate size
begin
fill the Memory_Stream instance
write its contents to the UDP stream[1]
end
A further benefit of using streams was that we were communicating
between machines of different endianness, and GNAT contains an optional
stream implementation that will transparently convert to/from network
byte order.
[1] not sure that FIFO_Streams offers this without copying the contents
out?
next prev parent reply other threads:[~2019-02-10 17:54 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-06 23:10 Ada x <whatever> Datagram Sockets Rego, P.
2019-02-07 0:42 ` Jere
2019-02-07 5:28 ` Rego, P.
2019-02-07 6:00 ` Egil H H
2019-02-07 6:41 ` Rego, P.
2019-02-07 7:23 ` Egil H H
2019-02-07 11:48 ` Jere
2019-02-08 19:41 ` Rego, P.
2019-02-08 20:31 ` Dmitry A. Kazakov
2019-02-08 21:56 ` Rego, P.
2019-02-07 8:28 ` Dmitry A. Kazakov
2019-02-07 10:08 ` Simon Wright
2019-02-08 0:15 ` Randy Brukardt
2019-02-08 8:25 ` Simon Wright
2019-02-08 13:24 ` Dmitry A. Kazakov
2019-02-09 1:01 ` Randy Brukardt
2019-02-10 17:54 ` Simon Wright [this message]
2019-02-11 8:39 ` Dmitry A. Kazakov
2019-02-11 13:35 ` Simon Wright
2019-02-11 14:25 ` Dmitry A. Kazakov
2019-02-11 15:19 ` Simon Wright
2019-02-11 16:04 ` Dmitry A. Kazakov
2019-02-11 23:19 ` Randy Brukardt
2019-02-12 11:35 ` Simon Wright
2019-02-08 19:44 ` Rego, P.
2019-02-07 11:47 ` Jere
2019-02-07 18:00 ` Jeffrey R. Carter
2019-02-08 20:35 ` Rego, P.
2019-02-08 21:26 ` Jeffrey R. Carter
2019-02-08 22:02 ` Rego, P.
2019-02-08 21:38 ` Dmitry A. Kazakov
2019-02-08 20:00 ` Rego, P.
2019-02-07 10:11 ` Simon Wright
2019-02-08 20:03 ` Rego, P.
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox