comp.lang.ada
 help / color / mirror / Atom feed
* Sockets, Streams, and Element_Arrays: Much confusion
@ 2022-12-31 12:11 Mark Gardner
  2022-12-31 13:11 ` Dmitry A. Kazakov
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Mark Gardner @ 2022-12-31 12:11 UTC (permalink / raw)


Hello, I've been having a bit of difficulty doing some UDP socket 
programming in Ada. As outlined in my stackoverflow question here 
(https://stackoverflow.com/q/74953052/7105391), I'm trying to reply to 
messages I am getting over UDP.

GNAT.Sockets gives me a Stream_Element_Array, which I can't find any 
documentation on how to make use of other than "You should also be able 
to get a Stream, which you should use instead" (About ten years ago, on 
this very newsgroup, somebody said not to use streams with UDP, or at 
least not GNAT.Sockets.Stream).

Adasockets gives me a String, which I can work with, except it throws 
away the from data recvfrom gives it, apparently making it impossible to 
reply to the querying address.

At this point, I'm half-tempted to make my own binding, but as I've 
never done that sort of thing before, I thought I'd ask the wisdom of 
the Usenet if there is a way to convert a Stream_Element_Array into the 
exotic types of Unsigned_16 and String.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-01-05 10:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-31 12:11 Sockets, Streams, and Element_Arrays: Much confusion Mark Gardner
2022-12-31 13:11 ` Dmitry A. Kazakov
2022-12-31 13:50   ` Mark Gardner
2022-12-31 14:16     ` Dmitry A. Kazakov
2022-12-31 15:18     ` Jeffrey R.Carter
     [not found]   ` <de32dc82-ba42-4b27-a140-ddab9587219fn@googlegroups.com>
2022-12-31 22:49     ` Jeffrey R.Carter
2022-12-31 22:55     ` Dmitry A. Kazakov
2022-12-31 17:39 ` Simon Wright
2022-12-31 19:36   ` Mark Gardner
2022-12-31 20:16     ` Dmitry A. Kazakov
2022-12-31 23:41       ` Simon Wright
2023-01-01  9:48         ` Dmitry A. Kazakov
2023-01-01 16:11           ` Simon Wright
2023-01-01 16:17         ` Niklas Holsti
2023-01-05  7:55 ` Daniel Norte de Moraes
2023-01-05 10:35   ` Dmitry A. Kazakov

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