Ludo Brands wrote:
On 03/24/2013 10:54 AM, Mark Morgan Lloyd wrote:
I've added a call to FBAdmin to what I'm working on, to get the full
description of the server (i.e. comparable to PostgreSQL's version()
function). Thanks Ludo :-)

Is it possible to piggyback this onto an open Firebird connection, in
case somebody interposes some sort of connection pooling layer?


In trunk you'll find TSQLConnection.GetConnectionInfo that was added for
this purpose. Use one of the TConnInfoType enums to get server or client
info.

Thanks Ludo, I'll look at that. For version conditionals what will that be- 2.6.6?

Is there any way of determining what port the client is using for an
open connection (i.e. not the 3050 at the server end)? Postgres
implements this with inet_client_port(), and I'm considering a situation
where the port numbers could be used as a low-security authenticator for
backchannel commands (e.g. so that a server could tell a client to choke
work it's relaying for one particular user who's hogging bandwidth).


inet_client_port is an SQL function used for example to log the client
connection. It is only valid for the current connection. I'm not aware
of anything similar in Firebird. Interbase 7+ has the TMP$ATTACHMENTS
table that has info on all connections but afaik Firebird doesn't have
this yet.

Thanks, noted that for the future and noted also Reinier's mention of MON$ATTACHMENT: I see that this gives the server pid which might be a better bit of "shared knowledge" since it would be marginally more difficult to sniff.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to