So, treating it like a tcp socket was working well when trying to wait for 
a query response.  However, during an asynchronous connection, libpq will 
cycle between reading & writing, while calling PQconnectPoll(..).

Is there a way (using the tcp series of functions) to wait until a socket 
is writable, and issue a callback at that point in time?

The best I can find for that, is to actually try writing to it with an 
empty buffer, and use the callback there to do the next operation.

OR, I can look at using uv_poll* which appears to have the ability to 
detect if a socket is readable or writable at a point in time.  Since I 
don't actually need to read or write to the socket directly, is there any 
particular reason to avoid using the uv_poll series of functions, since all 
I need to do is have a callback execute when a socket ready for reading or 
writing?  Efficiency, perhaps?

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to