comp.lang.ada
 help / color / mirror / Atom feed
* Characters stream through Network Sockets (C <=> Ada)
@ 2011-12-28 13:32 Ada BRL
  2011-12-28 15:52 ` Niklas Holsti
  0 siblings, 1 reply; 2+ messages in thread
From: Ada BRL @ 2011-12-28 13:32 UTC (permalink / 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!!!!



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-28 15:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-28 13:32 Characters stream through Network Sockets (C <=> Ada) Ada BRL
2011-12-28 15:52 ` Niklas Holsti

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