From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!aioe.org!qYcU9JfyUhY8OJVCu5UZdA.user.46.165.242.91.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Sockets, Streams, and Element_Arrays: Much confusion Date: Thu, 5 Jan 2023 11:35:33 +0100 Organization: Aioe.org NNTP Server Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: gioia.aioe.org; logging-data="11200"; posting-host="qYcU9JfyUhY8OJVCu5UZdA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:64775 List-Id: On 2023-01-05 08:55, Daniel Norte de Moraes wrote: > Em Sat, 31 Dec 2022 14:11:55 +0200, Mark Gardner escreveu: >> 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. > > You are obliged to use gnat-sockets ? > No? then use https://github.com/danieagle/adare-net The OP's question was about Stream_Element_Array being used for payload. In that regard there is no difference between GNAT.Sockets and the library you suggest. P.S. I am not sure if the library supports socket select and setting all necessary socket flags (e.g. NODELAY). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de