comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Gnat Sockets & Streams
Date: Sat, 15 Sep 2012 08:28:22 +0100
Date: 2012-09-15T08:28:22+01:00	[thread overview]
Message-ID: <m2zk4rlp7t.fsf@pushface.org> (raw)
In-Reply-To: 201209142101005065-rblove@airmailnet

Robert Love <rblove@airmail.net> writes:

> I've a problem with the Gnat.Sockets that is driving me crazy.  I have
> to use multicast to announce a service is available.

> When I insert this code into my actual program it works differently.
> The string comes over 1 character at at time.  I've looked over the
> code to see that I used the package exactly like the example.  I've
> had coworkers look it over.  We don't see any way the
>
>  String'Output(Channel, "Dummy Data");
>
> can output the data one character at a time.    The Output is in a
> loop and I would expect to see
>
> Dummy Data
> Dummy Data
> Dummy Data
>
> instead of
>
> D
> u
> m
> m
> y
>
> D
>
> by the receiving program.  I've also used tcpdump to see that the
> packet really contains just one character instead of there being a
> problem with the receiving progam.
>
> Is there  any way a stream can be corrupted?  Any settings parameters
> I could compile with that change the behavior?

That is, I believe, the behaviour specified by the ARM[1], paras 25..27
and 9.

This happened to me a long time ago, I thought AdaCore had implemented
an optimisation for strings.

You could try writing a new String and overriding 'Write (shouldn't need
to override 'Output, but maybe ...)

[1] http://www.ada-auth.org/standards/12rm/html/RM-13-13-2.html




  reply	other threads:[~2012-09-21 13:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-15  2:01 Gnat Sockets & Streams Robert Love
2012-09-15  7:28 ` Simon Wright [this message]
2012-09-15 23:14   ` Simon Wright
2012-09-15  7:52 ` Dmitry A. Kazakov
2012-09-15 17:02   ` Simon Wright
2012-09-15 17:26     ` Robert Love
2012-09-15 18:17     ` Dmitry A. Kazakov
2012-09-15 19:27       ` Simon Wright
2012-09-16 13:38 ` gautier_niouzes
replies disabled

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