From: "Alexei Polkhanov" <alexp@ica.net>
Subject: GNAT.Sockets
Date: Sat, 23 Feb 2002 12:20:14 GMT
Date: 2002-02-23T12:20:14+00:00 [thread overview]
Message-ID: <2OLd8.106741$Cg5.6627950@news1.calgary.shaw.ca> (raw)
Hello.
Does GNAT.Sockets from Gnat-3.14 works on Win2000 ?
Somehow I manage to get some visible (by sniffer) activity on stack
running my own code.
Example taken from g-sockets.ads works fine on all UNIX platforms I have
tried, but
again on Win2000 it does not, raising "GNAT.SOCKETS.SOCKET_ERROR: [0] No
error" or "GNAT.SOCKETS.HOST_ERROR: Unknown error"
I suspect NT version little bit broken (?)
What about other GNAT.* packages ? Are they work on NT ? 2000 ? XP ?
Of course I can use Win32 bindings from GNAT, but then again it is platform
specific. In that case I better write low level socket stuff in C and bind
Ada code to it. What is GNAT.* for ?
Code I tried (below) gives me: STORAGE_ERROR: EXCEPTION_STACK_OVERFLOW.
with GNAT.Sockets; use GNAT.Sockets;
with Ada.Text_IO;
with Ada.Exceptions; use Ada.Exceptions;
procedure Main is
Address : Sock_Addr_Type;
Socket : Socket_Type;
Channel : Stream_Access;
begin
Initialize (Process_Blocking_IO => False);
Address.Addr := Addresses (Get_Host_By_Name("mail.ica.net"), 1);
Address.Port := 25;
Create_Socket (Socket);
Connect_Socket (Socket, Address);
Channel := Stream (Socket);
Ada.Text_IO.Put_Line (String'Input (Channel));
Close_Socket(Socket);
Finalize;
exception when E : others =>
Ada.Text_IO.Put_Line
(Exception_Name (E) & ": " & Exception_Message (E));
end Main;
next reply other threads:[~2002-02-23 12:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-23 12:20 Alexei Polkhanov [this message]
2002-02-25 18:11 ` GNAT.Sockets Pascal Obry
2002-03-23 23:53 ` GNAT.Sockets Volkert
2002-03-24 7:22 ` GNAT.Sockets Pascal Obry
2002-03-24 8:56 ` GNAT.Sockets Volkert
-- strict thread matches above, loose matches on Subject: below --
2007-10-09 13:04 GNAT.Sockets Bartek
2007-10-09 15:10 ` GNAT.Sockets anon
2007-10-09 20:36 ` GNAT.Sockets Maciej Sobczak
2007-10-10 4:52 ` GNAT.Sockets Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox