Re: on the semantics of connect(): EINTR, EALREADY, EINPROGRESS
From: Valentin Nechayev (netch@segfault.kiev.ua)
Date: 04/23/03
- Next message: Valentin Nechayev: "Re: signals generated ONLY by abort, kill, or raise"
- Previous message: johny: "hex edit in xemacs?"
- In reply to: David Madore: "Re: on the semantics of connect(): EINTR, EALREADY, EINPROGRESS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Valentin Nechayev <netch@segfault.kiev.ua> Date: Wed, 23 Apr 2003 08:34:14 +0300
>>> David Madore wrote:
DM> Thanks, but this essentially shows that non-blocking sockets are far
DM> more complicated to use than blocking sockets (consider the number of
DM> lines in the code fragments under the first URL, as opposed to the six
DM> lines above). Non-blocking is good when one wants to test for events
DM> on a variety of sources: it is definitely overkill when testing
DM> connection on a *single* socket.
Non-blocking is good when you have event-driven program. If your program
has to deal with signals in the way more complicated than simple termination,
i.e. handle the signal and return to previous work, it is event-driven.
You showed in details that continuation of blocking connect() isn't possible
in the same way on different platforms. So, you should use nonblocking
connect().
-netch-
- Next message: Valentin Nechayev: "Re: signals generated ONLY by abort, kill, or raise"
- Previous message: johny: "hex edit in xemacs?"
- In reply to: David Madore: "Re: on the semantics of connect(): EINTR, EALREADY, EINPROGRESS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|