[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Error handling/checking, exceptions in general
From: |
Daniel A. Koepke |
Subject: |
Re: [Help-smalltalk] Error handling/checking, exceptions in general |
Date: |
Sat, 21 Dec 2002 09:37:59 -0800 (PST) |
On Sat, 21 Dec 2002, Bonzini wrote:
> It should be an error if the socket cannot be connected... though I
> don't remember the exact semantics because connect does not block.
A non-blocking connect (in C, anyway) would return EINPROGRESS if it
cannot complete the connection immediately. You'd be responsible for
polling for the completion of the connection by selecting on the
writability of the socket. Once the socket becomes writable, then you
need to getsockopt() to read the SO_ERROR option to determine if the
connection failed or succeeded.
It appears gst uses poll() and checks for the POLLERR flag, which I think
should work to test for the completion of the connection (although, it
doesn't necessarily mean the connection was successful).
-dak
- [Help-smalltalk] Error handling/checking, exceptions in general, Peter Schuller, 2002/12/20
- [Help-smalltalk] Error handling/checking, exceptions in general, Bonzini, 2002/12/21
- Re: [Help-smalltalk] Error handling/checking, exceptions in general, Peter Schuller, 2002/12/21
- Re: [Help-smalltalk] Error handling/checking, exceptions in general, Daniel A. Koepke, 2002/12/21
- Re: [Help-smalltalk] Error handling/checking, exceptions in general, Peter Schuller, 2002/12/21
- Re: [Help-smalltalk] Error handling/checking, exceptions in general, Peter Schuller, 2002/12/21
- Re: [Help-smalltalk] Error handling/checking, exceptions in general, Daniel A. Koepke, 2002/12/21
- Re: [Help-smalltalk] Error handling/checking, exceptions in general, Bonzini, 2002/12/23
Re: [Help-smalltalk] Error handling/checking, exceptions in general,
Daniel A. Koepke <=