🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #4258

Re: TPowersock through a HTTP proxy server

#4258
From: Fu, Bin
Date: Thu, 10 Mar 2005 16:39
47 lines
2443 bytes
I found that with the component TNMHTTP, the subclass of TPowersock,
it is allowed to set to Proxy and ProxyPort. Nevertheless, after I set
Proxy and ProxyPort, the method Transaction() still cannot go through
the proxy server. I put the same Proxy IP and proxy port into IE
option, and IE works well through the proxy server.

the source code look somehow like following: 

void TF_Main::iniPowersockConnection()
{
    if (NMHTTP1->FConnected == true)
        NMHTTP1->Disconnect();

    NMHTTP1->Host = "www.*****.com";
    NMHTTP1->Port = F_Option->getPort();
    NMHTTP1->Proxy = F_Option->E_ProxyIP->Text;  //e.g:  192.168.0.888
    NMHTTP1->ProxyPort = StrToInt(F_Option->E_ProxyPort->Text); 
//e.g: 808
    NMHTTP1->TimeOut = 40000;
    NMHTTP1->Connect();

    ...............
    ...............

    response = NMHTTP1->Transaction(request);   // it cannot go
through the proxy server
}


Hopefully, somebody can give me some tips
Thanks a lot & regards


fubin@gmx.de (Fu, Bin) wrote in message news:<3c6f305.0503090222.7c97e3e4@posting.google.com>...
> Hi,
> 
> My application uses TPowersock to send requests with XML format to a
> remote server and get corresponding responses also with XML format.
> But many users of this application work in a LAN that is connected to
> internet with a HTTP proxy server, so that TPowersock doesn't work
> under this circumstance. There are two properties "Proxy" and
> "ProxyPort" defined in TPowersock but both are protected. I don't know
> if someone knows a good solution for this problem.
> 
> Thanks a lot
> 
> Bin
Technical Details
Message-ID: <3c6f305.0503100839.4afdf910@posting.google.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!not-for-mail
References: <3c6f305.0503090222.7c97e3e4@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,29b2ac2f73e03736
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!not-for-mail
From: fubin@gmx.de (Fu, Bin)
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: TPowersock through a HTTP proxy server
Date: 10 Mar 2005 08:39:07 -0800
Organization: http://groups.google.com
Lines: 47
Message-ID: <3c6f305.0503100839.4afdf910@posting.google.com>
References: <3c6f305.0503090222.7c97e3e4@posting.google.com>
NNTP-Posting-Host: 80.171.135.89
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1110472748 13979 127.0.0.1 (10 Mar 2005 16:39:08 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 10 Mar 2005 16:39:08 +0000 (UTC)