Thread: exposing conn->sock?

exposing conn->sock?

From
Alex Pilosov
Date:
Hi,

I have a question whether a patch which would expose conn->sock (the
actual socket connected to the server) via a function would be
acceptable/accepted. My application does essentially a select() loop on
various sockets, and is also waiting for asynchronous notifications from
database. While I know about pqWait, pqReadReady etc, these all require
busy-waiting of some sort and do not allow for immediate notification when
combined with waiting on some other fds.

So, is there some particular reason conn->sock is not exposed?

-alex



Re: exposing conn->sock?

From
Tom Lane
Date:
Alex Pilosov <alex@pilosoft.com> writes:
> So, is there some particular reason conn->sock is not exposed?

Apparently you didn't notice PQsocket() yet ...
        regards, tom lane