From: Stephen Leake <Stephe.Leake@nasa.gov>
Cc: sam@rfc1149.net
Subject: Re: [OT] Two sockets questions
Date: 07 May 2003 15:52:30 -0400
Date: 2003-05-07T20:07:47+00:00 [thread overview]
Message-ID: <uk7d2lekh.fsf@nasa.gov> (raw)
In-Reply-To: 8765omaa6b.fsf@inf.enst.fr
Samuel Tardieu <sam@rfc1149.net> writes:
> >>>>> "Jano" == Jano <nono@celes.unizar.es> writes:
>
> Jano> Is there a way of performing a connect without blocking on it? I
> Jano> suspect not... and if not in Ada, by other means?
>
> Sure! I'll describe the process in C, I do not know whether
> GNAT.Sockets allows you to do all those steps:
>
> 1) Create your socket
> 2) Make it non-blocking
> 3) connect() will return immediately with either 0 (success), -1
> with errno set to EINPROGRESS or -1 with another error (real
> error).
> 4) If the result was -1/EINPROGRESS, do a select() on the socket for
> writing. When it tells you that you can write, write() 0 bytes. If
> there is no error (write() returns 0), then you are
> connected. Otherwise, you will get an error (typically
> -1/ENOTCONN).
This is not C. It is English. Hm, I suppose "EINPROGRESS" could be a C
macro, but it could equally well be an Ada named number.
I suspect Jano is wondering how to accomplish step 2; exactly what
function (C or Ada) should be called, with what parameters?
--
-- Stephe
next prev parent reply other threads:[~2003-05-07 19:52 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-07 18:03 [OT] Two sockets questions Jano
2003-05-07 18:22 ` Samuel Tardieu
2003-05-07 19:52 ` Stephen Leake [this message]
2003-05-07 20:08 ` David C. Hoos
2003-05-07 22:33 ` Jano
2003-05-08 9:10 ` Samuel Tardieu
2003-05-08 21:35 ` Jano
2003-05-09 8:14 ` Samuel Tardieu
2003-05-09 14:32 ` Jano
2003-05-10 14:06 ` Jano
2003-05-10 18:01 ` tmoran
2003-05-10 21:27 ` Samuel Tardieu
2003-05-11 18:01 ` tmoran
2003-05-08 17:48 ` Stephen Leake
2003-05-08 18:42 ` Samuel Tardieu
2003-05-08 21:41 ` Jano
2003-05-08 21:48 ` Jano
2003-05-08 22:35 ` tmoran
2003-05-09 14:42 ` Jano
2003-05-10 8:57 ` Tarjei T. Jensen
2003-05-10 16:55 ` Simon Wright
2003-05-11 18:23 ` Tarjei T. Jensen
2003-05-11 2:05 ` tmoran
2003-05-08 21:40 ` Jano
2003-05-07 20:02 ` Jano
2003-05-08 8:57 ` Samuel Tardieu
2003-05-08 21:39 ` Jano
2003-05-08 10:14 ` Preben Randhol
2003-05-08 11:09 ` Samuel Tardieu
2003-05-08 21:40 ` Jano
2003-05-09 8:19 ` Samuel Tardieu
2003-05-08 18:06 ` tmoran
2003-05-07 20:09 ` tmoran
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox