freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "John D. Robertson" <john AT rrci.com>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] How to retrieve network socket?
- Date: Wed, 27 May 2015 13:34:54 -0400
On Wed, 27 May 2015 08:31:05 -0400
"John D. Robertson" <john AT rrci.com> wrote:
> I can't seem to find how one goes about retrieving the network socket from
> DBPROCESS. For asynchronous queries, I'd like to submit the socket (among
> many other sockets) to select() to find out when there is data waiting to
> be read.
>
It looks like this works for a quick hack, but there should be an API call:
DBPROCESS *dbp;
/* Get connected to server ... */
/* The first member of 'struct tds_dblib_dbprocess' is
* is a 'struct tds_socket*', and the first member of
* 'struct tds_socket' is the socket, an 'int' on all *nix systems.
*/
int sock= **((int**)dbp);
/* There you go. */
--
=============================================================
John D. Robertson, Computer / Engineering Consultant
Robertson & Robertson Consultants, Inc.
3637 West Georgia Rd.
Pelzer, SC 29669
Phone: (864) 243-2436
Email: john AT rrci.com
WWW: http://www.rrci.com
-
[freetds] How to retrieve network socket?,
John D. Robertson, 05/27/2015
-
Re: [freetds] How to retrieve network socket?,
John D. Robertson, 05/27/2015
-
Re: [freetds] How to retrieve network socket?,
Ramiro Morales, 05/27/2015
- Re: [freetds] How to retrieve network socket?, John D. Robertson, 05/27/2015
-
Re: [freetds] How to retrieve network socket?,
Ramiro Morales, 05/27/2015
-
Re: [freetds] How to retrieve network socket?,
John D. Robertson, 05/27/2015
Archive powered by MHonArc 2.6.24.