Article View: borland.public.cppbuilder.internet.socket
Article #846Re: Getting Host:Port Pair for connection using TIdTCPServer
From: Remy Lebeau (TeamB)
Date: Thu, 02 Aug 2007 20:49
Date: Thu, 02 Aug 2007 20:49
19 lines
1538 bytes
1538 bytes
"Oleg Tiktinski" <oleg@sequoiars.com> wrote in message
news:46b22942$1@newsgroups.borland.com...
> What I am doing wrong ?
You are accessing the wrong properties. You need to access the PeerIP and
PeerPort properties of the IOHandler's Binding instead, ie:
void __fastcall TPaymentService::tcp_server_serverConnect(TIdContext
*AContext)
{
event_log("port " +
IntToStr(AContext->Connection->Socket->Binding->PeerPort));
event_log("host " + AContext->Connection->Socket->Binding->PeerIP);
}
Gambit
Technical Details
Message-ID:
<46b2438f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<46b22942$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b20c26fe57e8a41f X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <46b22942$1@newsgroups.borland.com> Subject: Re: Getting Host:Port Pair for connection using TIdTCPServer Date: Thu, 2 Aug 2007 13:49:44 -0700 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 75.83.29.61 Message-ID: <46b2438f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1186087823 75.83.29.61 (2 Aug 2007 13:50:23 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail