Additional info: Here's the class which sometimes gives 10053 and sometimes
StatusCode = 0 when run against a server with self-signed SSL cert:

class WebClient
 {
private:
TSslContext *sslContext;

AdminClient *adminClient;

bool aborted;

TMemoryStream *sendStream;
public:
TMemoryStream *receiveStream;
 unsigned int lastActionTime;
TSslHttpCli *HTTPClient;
int OnDone;

__fastcall WebClient(AdminClient *adminClient)
{
this->adminClient = adminClient;
 aborted = false;

sendStream = new TMemoryStream();
 receiveStream = new TMemoryStream();

HTTPClient = new TSslHttpCli(NULL);
 sslContext = new TSslContext(NULL);

HTTPClient->Agent = "Fastream IQWF/IQProxy";
 HTTPClient->SslContext = sslContext;
HTTPClient->SslContext->SslVerifyPeer = false;
 HTTPClient->SslContext->SslVerifyPeerModes << SslVerifyMode_PEER;
HTTPClient->SendStream = sendStream;
 HTTPClient->RcvdStream = receiveStream;
HTTPClient->OnRequestDone = RequestDone;
 HTTPClient->Timeout = 40;

lastActionTime = 0;
}

__fastcall ~WebClient()
{
HTTPClient->OnRequestDone = NULL;
 HTTPClient->Abort();

delete HTTPClient;
delete sslContext;

delete sendStream;
delete receiveStream;
}

void __fastcall SendPOST(const String &URL, TMemoryStream *sendStream)
{
 receiveStream->Clear();
HTTPClient->URL = URL;
HTTPClient->SendStream = sendStream;
 aborted = false;
lastActionTime = GetTickCount();

try
 {
HTTPClient->Post(); // sync
}
 catch(Exception &e)
{
}
 }

void __fastcall CheckTimeout(void)
{
 if(lastActionTime && (GetTickCount() > (lastActionTime + 15000)))
{
 aborted = true;
HTTPClient->Abort();
}
 }

void __fastcall RequestDone(TObject *Sender, THttpRequest RqType, WORD
ErrCode)
 {
delete HTTPClient->SendStream;
HTTPClient->SendStream = NULL;

lastActionTime = 0;

if(ErrCode)
adminClient->HTTPClientHostUnreachable(ErrCode);
 else if(aborted)
adminClient->HTTPClientWaitTimeoutExpired();
 else if(HTTPClient->StatusCode != 200)
adminClient->HTTPClientOnHTTPError();
 else
adminClient->HTTPClientDone(receiveStream);
}

};

Hope you can help. Thanks in advance,

SZ

On Sat, Dec 25, 2010 at 9:24 AM, Fastream Technologies
<ga...@fastream.com>wrote:

> Hello,
>
> With the HttpCli, I get 10053 when lots of consecutive POSTs are made with
> SSL. I first thought it is related to the 4096 bit self-signed cert we used
> but it does not happen on Win2008. The test machine is remote (in the
> Netherlands) and when I run the GUI (web client) from here on my Win7, it
> works as expected. It also works if I run it against the same ICS web server
> on localhost. But when I run the client on Win2008 remotely on RDP, it
> crashes! Since all but all customers use Win2008, I need some help with
> this!
>
> Happy holidays to all of you!
>
> SZ
>
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to