From: Mark Gardner <magardner2017@gmail.com>
Subject: Sockets, Streams, and Element_Arrays: Much confusion
Date: Sat, 31 Dec 2022 14:11:55 +0200 [thread overview]
Message-ID: <top8uc$cqv$1@gioia.aioe.org> (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.
next reply other threads:[~2022-12-31 12:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-31 12:11 Mark Gardner [this message]
2022-12-31 13:11 ` Sockets, Streams, and Element_Arrays: Much confusion 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox