comp.lang.ada
 help / color / mirror / Atom feed
From: Adrien Plisson <aplisson-news@stochastique.net>
Subject: Re: Using GNAT.Sockets
Date: Mon, 18 Apr 2005 17:48:12 +0200
Date: 2005-04-18T17:48:12+02:00	[thread overview]
Message-ID: <4263d6bc$0$1407$ba620e4c@news.skynet.be> (raw)
In-Reply-To: <1113838500.614450.176530@l41g2000cwc.googlegroups.com>

markp wrote:

> No,
> 
> It is an Ada program that does not use streams. It uses simply
> address/byte count passed to the TCP. I'm guessing by your answer it
> must use streams also. I don't have control over the other side, so,
> does this mean I will not be able to use streams on my side?
> 
> Mark

the 'Input attribute, when used on an array type, first tries to read 
the bounds of the array (ARM95 13.13.2 §26). those bounds are 
definitely NOT part of the data received, since the sender did not use 
streams, and that may explain the corruption you encountered (you are 
lucky: on fr.comp.lang.ada, another poster got a Storage_Error).

the solution is:
- either use 'Read and 'Write instead of 'Input and 'Output
- or rewrite the sender so that it uses 'Input and 'Output.

you should read ARM95 13.13.2 to understand what data are placed on 
the stream when using stream attributes.

-- 
rien






  reply	other threads:[~2005-04-18 15:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-13 15:07 Using GNAT.Sockets markwork66
2005-04-13 15:43 ` Duncan Sands
2005-04-15  9:04   ` markp
2005-04-15  9:25     ` Duncan Sands
2005-04-18  9:01       ` markp
2005-04-18 13:23         ` Michael Paus
2005-04-18 14:32           ` markp
2005-04-18 15:14             ` Adrien Plisson
2005-04-18 15:35               ` markp
2005-04-18 15:48                 ` Adrien Plisson [this message]
2005-04-18 17:06                   ` markp
2005-04-18 18:23                     ` markp
2005-04-18 20:45                     ` Eric Jacoboni
2005-04-18 21:30                       ` Pascal Obry
2005-04-18 23:00                         ` Eric Jacoboni
2005-04-19  7:04                           ` Pascal Obry
2005-04-19 17:36                           ` Björn Lundin
2005-04-19 19:08                             ` Eric Jacoboni
2005-04-18 13:51         ` Marc A. Criley
2005-04-14 14:45 ` Bob Spooner
2005-04-15  9:06   ` markp
2005-04-15 11:47     ` Michael Paus
2005-04-15 14:07       ` Bob Spooner
2005-04-17 15:35         ` Michael Paus
replies disabled

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