From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,260c33c8389d63b1,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-23 04:20:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!logbridge.uoregon.edu!hub1.nntpserver.com!peer1-sjc1.usenetserver.com!usenetserver.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news1.calgary.shaw.ca.POSTED!not-for-mail X-Trace-PostClient-IP: 24.78.75.174 Reply-To: "Alexei Polkhanov" From: "Alexei Polkhanov" Newsgroups: comp.lang.ada Subject: GNAT.Sockets X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <2OLd8.106741$Cg5.6627950@news1.calgary.shaw.ca> Date: Sat, 23 Feb 2002 12:20:14 GMT NNTP-Posting-Host: 24.69.255.206 X-Complaints-To: abuse@shaw.ca X-Trace: news1.calgary.shaw.ca 1014466814 24.69.255.206 (Sat, 23 Feb 2002 05:20:14 MST) NNTP-Posting-Date: Sat, 23 Feb 2002 05:20:14 MST Organization: Shaw Residential Internet Xref: archiver1.google.com comp.lang.ada:20289 Date: 2002-02-23T12:20:14+00:00 List-Id: 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;