Ada Programming/Libraries/GNAT.Sockets

Example
;             ;  ;             ;  ;   Ada.Streams.Stream_Element_Count; Vcv Client : Socket_Type; Address : Sock_Addr_Type; Channel : Stream_Access; Send  : String := (1 => ASCII.CR, 2 => ASCII.LF,                         3 => ASCII.CR, 4 => ASCII.LF); Offset : Ada.Streams.Stream_Element_Count; Data  : Ada.Streams.Stream_Element_Array (1 .. 256); GNAT.Sockets.Initialize; -- initialize a specific package Create_Socket (Client); Address.Addr := Inet_Addr("203.66.88.89"); Address.Port := 80; Connect_Socket (Client, Address); Channel := Stream (Client); String'Write (Channel, "GET / HTTP/1.1" & Send); Ada.Streams.Read (Channel.All, Data, Offset); Offset = 0; I 1 .. Offset Ada.Text_IO.Put (Character'Val (Data (I))); ;    ;  Vcv;

Wikibook

 * Ada Programming/Libraries/GNAT

|GNAT.Sockets