public inbox for
help / color / mirror / Atom feed
From: Simon Wright <>
Subject: Re: ada/9535: Datagram socket semantics are wrong
Date: Sat, 01 Mar 2003 08:06:00 -0000	[thread overview]
Message-ID: <> (raw)

The following reply was made to PR ada/9535; it has been noted by GNATS.

From: Simon Wright <>
Subject: Re: ada/9535: Datagram socket semantics are wrong
Date: Sat, 01 Mar 2003 07:57:02 +0000
 A clarification (I hope):
 At present, you can't use 'Read, 'Write with Stream(UDP_Socket) at all 
 (except for
 elementary types). You can Write a Stream_Element_Array, but you can't 
 Read one unless
 you know beforehand how big it needs to be. The patch I sent allows you 
 to Read into an
 arbitrarily-sized Stream_Element_Array, but you still can't do 'Read, 
 'Write directly.
 It's at least arguable that users should not be able to get a Stream at 
 all for a UDP socket (use
 Receive_Socket, Send_Socket instead). That solution would cause us 
 problems on the
 writing side: to avoid multiple OS calls, we
    get the user to stream his data into a memory stream
    get the user to write the contents of the memory stream to your 
 socket's stream in one go.
 On the UDP read side (using unpatched GNAT), we
    Receive_Socket into a memory stream
    give the user our memory stream to read from rather than your 
 socket's stream.

             reply	other threads:[~2003-03-01  8:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-01  8:06 Simon Wright [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-13  0:36 Dara Hazeghi
2003-02-01 18:06 simon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).