help-smalltalk
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]