Article View: borland.public.cppbuilder.internet.socket
Article #843Getting Host:Port Pair for connection using TIdTCPServer
From: Oleg Tiktinski
Date: Thu, 02 Aug 2007 18:58
Date: Thu, 02 Aug 2007 18:58
25 lines
1670 bytes
1670 bytes
Using Borland C++ Builder 2006 with Indy 10.
All my attempts to get Host:Port pair for incoming connection failed,
In serverExecute and serverConnect event handlers I got empty strings.
What I am doing wrong ?
Did anyone know how to obtain host:port pair ?
Thank you!
void __fastcall TPaymentService::tcp_server_serverExecute(TIdContext
*AContext)
{
event_log("host "+AContext->Connection->IOHandler->Host);
}
void __fastcall TPaymentService::tcp_server_serverConnect(TIdContext
*AContext)
{
event_log("port "+IntToStr(AContext->Connection->Socket->Port));
event_log("host "+AContext->Connection->Socket->Host);
event_log("dest "+AContext->Connection->Socket->Destination);
}
Technical Details
Message-ID:
<46b22942$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!txtfeed1.tudelft.nl!tudelft.nl!txtfeed2.tudelft.nl!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b20c26fe57e8a41f,start X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 02 Aug 2007 11:58:15 -0700 From: Oleg Tiktinski <oleg@sequoiars.com> User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Getting Host:Port Pair for connection using TIdTCPServer Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.4.183.142 Message-ID: <46b22942$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1186081090 69.4.183.142 (2 Aug 2007 11:58:10 -0700) Lines: 25 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!txtfeed1.tudelft.nl!tudelft.nl!txtfeed2.tudelft.nl!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail