The way I see it, we have two options:
1) Read the default value from the registry. That's some fairly ugly code, imho.
It seems faily simple to yank these values out, no? Even easier if you
use the all-in-wonder shell function SHGetValue().
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
Values: KeepAliveTime, KeepAliveInterval
Type: DWORD
The only annoying thing is that the values may not exist. Well, it is
also rather annoying there is no way to set the counter.
The API used is documented at:
http://msdn.microsoft.com/en-us/library/dd877220(v=VS.85).aspx
Patch as it looks now (libpq only, and with obvious problems with this
issue): http://github.com/mhagander/postgres/compare/master...win32keepalive
and here :)
http://archives.postgresql.org/pgsql-hackers/2009-05/msg01099.php
--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers