7 Sep 11:57
More AdaSockets
From: pierre bodilis <pierre.bodilis <at> gmail.com>
Subject: More AdaSockets
Newsgroups: gmane.comp.lang.ada.sockets
Date: 2006-09-07 09:57:24 GMT
Subject: More AdaSockets
Newsgroups: gmane.comp.lang.ada.sockets
Date: 2006-09-07 09:57:24 GMT
Hi everyone
I don't know if Samuel Tardieu got my email, but I'll post that here
in case someone find it useful :)
I needed a poll function, so I made one which could be useful at some
point. I also made a Send_Some (same as receive_some), of which I'm
still wondering if it is truely useful or it's just a stupid idea of
mine (and in anycase, I need it, so I'll keep it). And finally, I also
adapted 2 functions from GNAT.Sockets : Get_Service_By_Name and
Port_Number.
I'd think a Poll function would be fine in AdaSockets :)
----------------------------------------------------------------------------------------------------------------------
--- specs :
with Ada.Streams; use Ada.Streams;
with Sockets; use Sockets;
package More_AdaSockets is
type Poll_Option is (POLLNULL, -- nothing...
POLLIN, -- There is data to read
POLLPRI, -- There is urgent data to read
POLLOUT, -- Writing now will not block
POLLERR, -- Error condition
POLLHUP, -- Hung up
POLLNVAL, -- Invalid request: fd not open
-- When compiling XPG4.2 source also has
POLLRDNORM, -- Normal data may be read
(Continue reading)
RSS Feed