comp.lang.ada
 help / color / mirror / Atom feed
From: Ada BRL <ada.brl.2011@gmail.com>
Subject: Characters stream through Network Sockets (C <=> Ada)
Date: Wed, 28 Dec 2011 05:32:36 -0800 (PST)
Date: 2011-12-28T05:32:36-08:00	[thread overview]
Message-ID: <0ca20824-422d-4384-8486-67301c35e5c6@u32g2000yqe.googlegroups.com> (raw)

Hello everyone!

This is my problem:
I have a C program that sends/receives data to/from an Ada program
through Network sockets (pkg GNAT.Sockets).

I can send a string from the Ada program to the C program.

BUT I can't send any string (or array of chars) from the C program to
the Ada one: the only thing that works is sending only one character
at a time.

I've tried using 'Read and 'Input member functions of several types
(Chars, String, Interfaces.C.char_array, ...) but nothing worked.

The funniest thing is that inside the C program the send function
seems to be working, since it returns the correct number of characters
sent.
Instead, the Ada program blocks itself on 'Read (or 'Input) function
and freezes.

Do anyone know how to read a char stream coming from a C program? (I'm
using Winsock2 legacy library)

Thank you very very much!!!!



             reply	other threads:[~2011-12-28 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28 13:32 Ada BRL [this message]
2011-12-28 15:52 ` Characters stream through Network Sockets (C <=> Ada) Niklas Holsti
replies disabled

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