Re: [twsocket] Problem with THttpCli

2007-03-20 Thread Francois PIETTE
You can encapsulate ICS component into your own component (That this derive 
your component from ICS component) and manage the flag you need by trapping 
everything you need.

--
[EMAIL PROTECTED]
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, March 20, 2007 6:24 PM
Subject: [twsocket] Problem with THttpCli


> Hello,
>
> Let's say in a function you have THttpCli passed as pointer. I can check
> whether it is ->Connected or not. But how can one see if it is processing 
> or
> not? I mean, I need to learn if it is working or not. I hope you get what 
> I
> mean. I believe the State != httpReady is not always reliable since the
> SetReady Posts a message after state is set. What would you suggest?
>
> Best Regards,
>
> SZ
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Problem with THttpCli

2007-03-20 Thread Fastream Technologies
Hello,

Let's say in a function you have THttpCli passed as pointer. I can check 
whether it is ->Connected or not. But how can one see if it is processing or 
not? I mean, I need to learn if it is working or not. I hope you get what I 
mean. I believe the State != httpReady is not always reliable since the 
SetReady Posts a message after state is set. What would you suggest?

Best Regards,

SZ 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2006-08-03 Thread Fastream Technologies
But this is a reverse proxy. I perhaps forgot to tell, sorry.. ;(

- Original Message - 
From: "Frans van Daalen" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, August 03, 2006 4:47 PM
Subject: Re: [twsocket] Problem with THttpCli


: some proxy-servers do not allow the head command.
:
: Frans
:
: - Original Message - 
: From: "Fastream Technologies" <[EMAIL PROTECTED]>
: To: "ICS support mailing" 
: Sent: Thursday, August 03, 2006 3:36 PM
: Subject: [twsocket] Problem with THttpCli
:
:
: > Hello,
: >
: > I am trying to add our web server cache to proxy server. So far so good
: > but
: > there is a problem:
: >
: > I first send the HEAD command to learn the last modified date and file
: > size.
: > Then in onheaderend, I launch the GET command if the cache cannot 
satisfy
: > the request. Here, sometimes the component does not fire the 
onheaderdata
: > and onheaderend of the GET. They all use the same component and no
: > exception
: > is raised. I put socketspy between the proxy and the web server and the
: > data
: > reaches the web proxy however what I could figure out from the delphi 
code
: > is that the state of the component is httpwaitingheader after the HEAD
: > whereas it ought to be httpReady. Any idea?
: >
: > Best Regards,
: >
: > SubZero
: >
: > -- 
: > To unsubscribe or change your settings for TWSocket mailing list
: > please goto http://www.elists.org/mailman/listinfo/twsocket
: > Visit our website at http://www.overbyte.be
: >
:
: -- 
: To unsubscribe or change your settings for TWSocket mailing list
: please goto http://www.elists.org/mailman/listinfo/twsocket
: Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2006-08-03 Thread Frans van Daalen
some proxy-servers do not allow the head command.

Frans

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, August 03, 2006 3:36 PM
Subject: [twsocket] Problem with THttpCli


> Hello,
>
> I am trying to add our web server cache to proxy server. So far so good 
> but
> there is a problem:
>
> I first send the HEAD command to learn the last modified date and file 
> size.
> Then in onheaderend, I launch the GET command if the cache cannot satisfy
> the request. Here, sometimes the component does not fire the onheaderdata
> and onheaderend of the GET. They all use the same component and no 
> exception
> is raised. I put socketspy between the proxy and the web server and the 
> data
> reaches the web proxy however what I could figure out from the delphi code
> is that the state of the component is httpwaitingheader after the HEAD
> whereas it ought to be httpReady. Any idea?
>
> Best Regards,
>
> SubZero
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Problem with THttpCli

2006-08-03 Thread Fastream Technologies
Hello,

I am trying to add our web server cache to proxy server. So far so good but 
there is a problem:

I first send the HEAD command to learn the last modified date and file size. 
Then in onheaderend, I launch the GET command if the cache cannot satisfy 
the request. Here, sometimes the component does not fire the onheaderdata 
and onheaderend of the GET. They all use the same component and no exception 
is raised. I put socketspy between the proxy and the web server and the data 
reaches the web proxy however what I could figure out from the delphi code 
is that the state of the component is httpwaitingheader after the HEAD 
whereas it ought to be httpReady. Any idea?

Best Regards,

SubZero 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli POST

2005-12-07 Thread Fastream Technologies
Hello,

Now I need to code the POST routine for the load-balancer but there is a big 
problem. I can get the data client sends in OnPostedData but how will I have 
my THttpCli->PostAsync() to not use file or stream and even more important 
to wait for data from the client before proceeding to Send()?

Best Regards,

SZ

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, December 01, 2005 7:50 PM
Subject: Re: [twsocket] Problem with THttpCli


> THttpCli(SenderLastError reads "0" in OnSocketError.
>
> What is unusual about my code is that I do not use a stream nor a file to
> get the data. I want to use the OnDocData and OnHeaderData events to read
> packet-by-packet. Is this possible? If yes how?
>
> Regards,
>
> SubZ
>
> - Original Message - 
> From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Thursday, December 01, 2005 12:18 PM
> Subject: Re: [twsocket] Problem with THttpCli
>
>
>> Hello SZ,
>>
>>> It gives no exception but throws ESocketError just after DNSLookup which
>>> is
>>> successful.
>>
>> Do you mean ESocketException ?
>> What is the error ?
>>
>> ---
>> Rgds, Wilfried [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> http://www.mestdagh.biz
>>
>> Wednesday, November 30, 2005, 15:21, Fastream Technologies wrote:
>>
>>> Hello,
>>
>>> I chose the second method (THttpCli) but the below code fails in a
>>> thread:
>>
>>> HTTPClient = new THttpCli(NULL);
>>> HTTPClient->MultiThreaded = true;
>>> HTTPClient->FollowRelocation = false;
>>> HTTPClient->NoCache = false;
>>> HTTPClient->RcvdStream = NULL;
>>> HTTPClient->SendStream = NULL;
>>> // all the events are assigned here
>>
>> HTTPClient->>URL = "http://"; + targetServerIP + ":" + targetServerPort +
>>> FPath;
>>
>>> if(FParams.Length())
>>> HTTPClient->URL += "?" + FParams;
>>
>>> try
>>> {
>>> HTTPClient->GetASync();
>>> }
>>> catch(...
>>
>>> It gives no exception but throws ESocketError just after DNSLookup which
>>> is
>>> successful. I tried with www.intel.com and the IE works just fine from
>>> here.
>>> I have a proxy setting for IE but that's optional and Mozilla works
>>> without
>>> proxy ok. I also tried to point socketspy to intel.com and used browser
>>> to
>>> access localhost:8000 (the port socketspy runs on) which worked but
>>> pointing
>>> HTTPClient did not.
>>
>>> Any help would be appreciated. I am using the November (downloaded 
>>> today)
>>> beta of ICS with -yet- no SSL.
>>
>>> Best Regards,
>>
>>> SZ
>>
>>
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-02 Thread Fastream Technologies
I fpund the problem: when OnSocketError is assigned, the problem occurs. As 
a workaround, I removed OnSocketError handler and check for errors in 
OnRequestDone.

Thank you!

SZ

- Original Message - 
From: "Arno Garrels" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Friday, December 02, 2005 12:59 PM
Subject: Re: [twsocket] Problem with THttpCli


> Fastream Technologies wrote:
>> The threading design is the same as NFServer and tested well. The problem
>> is in THttpCli: I want to download with no files on local computer to be
>> written to and no TStream as well. Could you try that? Just assign nil to
>> FRcvsStream and give a dummy filename in a non-existing directory. I 
>> would
>> provide an example but as you know I use C++.
>
> I can read C++ just fine. Please provide a very small sample application,
> that I can translate.
>
>
>> Best Regards,
>>
>> SubZ
>>
>> - Original Message -
>> From: "Arno Garrels" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" 
>> Sent: Friday, December 02, 2005 11:46 AM
>> Subject: Re: [twsocket] Problem with THttpCli
>>
>>
>>>> FYI: In our dersign, there is the serverThread for listening and there
>>>> are 2 threads per CPU clientThreads.
>>>
>>> Now your thread design looks totaly different.
>>> I suggest that you take a look at the new multi threaded TWSocketServer,
>>> available in latest beta release and the SSL distribution.
>>> It shows how to Attach/Detach threads and how to synchronize the 
>>> critical
>>> things.
>>>
>>>
>>> ---
>>> Arno Garrels [TeamICS]
>>> http://www.overbyte.be/eng/overbyte/teamics.html
>>>
>>>
>>>
>>> --
>>> To unsubscribe or change your settings for TWSocket mailing list
>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>> Visit our website at http://www.overbyte.be
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-02 Thread Arno Garrels
Fastream Technologies wrote:
> The threading design is the same as NFServer and tested well. The problem
> is in THttpCli: I want to download with no files on local computer to be
> written to and no TStream as well. Could you try that? Just assign nil to
> FRcvsStream and give a dummy filename in a non-existing directory. I would
> provide an example but as you know I use C++.

I can read C++ just fine. Please provide a very small sample application,
that I can translate. 

 
> Best Regards,
> 
> SubZ
> 
> - Original Message -
> From: "Arno Garrels" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Friday, December 02, 2005 11:46 AM
> Subject: Re: [twsocket] Problem with THttpCli
> 
> 
>>> FYI: In our dersign, there is the serverThread for listening and there
>>> are 2 threads per CPU clientThreads.
>> 
>> Now your thread design looks totaly different.
>> I suggest that you take a look at the new multi threaded TWSocketServer,
>> available in latest beta release and the SSL distribution.
>> It shows how to Attach/Detach threads and how to synchronize the critical
>> things.
>> 
>> 
>> ---
>> Arno Garrels [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> 
>> 
>> 
>> --
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-02 Thread Fastream Technologies
The threading design is the same as NFServer and tested well. The problem is 
in THttpCli: I want to download with no files on local computer to be 
written to and no TStream as well. Could you try that? Just assign nil to 
FRcvsStream and give a dummy filename in a non-existing directory. I would 
provide an example but as you know I use C++.

Best Regards,

SubZ

- Original Message - 
From: "Arno Garrels" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Friday, December 02, 2005 11:46 AM
Subject: Re: [twsocket] Problem with THttpCli


>> FYI: In our dersign, there is the serverThread for listening and there
>> are 2 threads per CPU clientThreads.
>
> Now your thread design looks totaly different.
> I suggest that you take a look at the new multi threaded TWSocketServer,
> available in latest beta release and the SSL distribution.
> It shows how to Attach/Detach threads and how to synchronize the critical
> things.
>
>
> ---
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
>
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-02 Thread Arno Garrels
> FYI: In our dersign, there is the serverThread for listening and there
> are 2 threads per CPU clientThreads.

Now your thread design looks totaly different.
I suggest that you take a look at the new multi threaded TWSocketServer,
available in latest beta release and the SSL distribution.
It shows how to Attach/Detach threads and how to synchronize the critical
things.


---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
 
  

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-01 Thread Fastream Technologies
Hello,

None of the following events are called:

HTTPClient->OnBeforeHeaderSend = HTTPClientBeforeHeaderSend;
HTTPClient->OnHeaderBegin = HTTPClientHeaderBegin;
HTTPClient->OnHeaderData = HTTPClientHeaderData;
HTTPClient->OnHeaderEnd = HTTPClientHeaderEnd;
HTTPClient->OnRequestDone = HTTPClientRequestDone;
HTTPClient->OnRequestHeaderBegin = HTTPClientRequestHeaderBegin;
HTTPClient->OnRequestHeaderEnd = HTTPClientRequestHeaderEnd;
HTTPClient->OnDocBegin = HTTPClientDocBegin;
HTTPClient->OnDocData = HTTPClientDocData;
HTTPClient->OnDocEnd = HTTPClientDocEnd;
HTTPClient->OnSendBegin = HTTPClientSendBegin;
HTTPClient->OnSendData = HTTPClientSendData;
HTTPClient->OnSendEnd = HTTPClientSendEnd;
HTTPClient->OnSessionConnected = HTTPClientSessionConnected;
HTTPClient->OnSessionClosed = HTTPClientSessionClosed;

It works without threads. There is no lasterror("0"). I have the following 
messagepump:

void __fastcall THTTPThread::messagePump(void)
{
MSG msg;

try
{
while(!Terminated && GetMessage(&msg, NULL, 0, 0))
{
processServerThreadMessage(msg);
}
}
catch(ESocketException &e)
{
}
}
//---
void __fastcall THTTPThread::processServerThreadMessage(const MSG &msg)
{
if(msg.message == WM_HTTP_CLIENT_THREAD_ATTACH)
{
httpServerClientClass *clientObject = 
(httpServerClientClass*)(void*)msg.wParam;
clientObject->ThreadAttach();
clientObject->createHTTPClient();
}
else if(msg.message == WM_HTTP_CLIENT_THREAD_DETACH)
{
httpServerClientClass *clientObject = 
(httpServerClientClass*)(void*)msg.wParam;
clientObject->serverThread->HTTPServerClientDisconnected(NULL, 
clientObject, msg.lParam);

THTTPServer *HTTPServer = clientObject->FServer;

lockCriticalSection(HTTPServer->connectDisconnectClientCS);
delete clientObject;
releaseCriticalSection(HTTPServer->connectDisconnectClientCS);
}
else
DispatchMessage(&msg);
}
//---

FYI: In our dersign, there is the serverThread for listening and there are 2 
threads per CPU clientThreads.

Best Regards,

SubZ

- Original Message - 
From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, December 01, 2005 8:52 PM
Subject: Re: [twsocket] Problem with THttpCli


> Hello SZ,
>
> I think so yes, but I'm not very familiar with THttpCli component. I use
> THttpSrv often but not the client.
>
> But to come back on your error. Can you eather put a try/catch block in
> all events, or try to debug with the IDE option 'break on delphi
> exception' on ?  I'm pretty sure the original exception is coming from a
> code fragment of you and is catched by the OnError of the ctrlSocket.
>
> I'm not 100% sure of the LastError, I just found it in the comment on
> top. I never used OnError but still it is used by THttpCli component.
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Thursday, December 1, 2005, 18:50, Fastream Technologies wrote:
>
>> THttpCli(SenderLastError reads "0" in OnSocketError.
>
>> What is unusual about my code is that I do not use a stream nor a file to
>> get the data. I want to use the OnDocData and OnHeaderData events to read
>> packet-by-packet. Is this possible? If yes how?
>
>> Regards,
>
>> SubZ
>
>> - Original Message - 
>> From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" 
>> Sent: Thursday, December 01, 2005 12:18 PM
>> Subject: Re: [twsocket] Problem with THttpCli
>
>
>>> Hello SZ,
>>>
>>>> It gives no exception but throws ESocketError just after DNSLookup 
>>>> which
>>>> is
>>>> successful.
>>>
>>> Do you mean ESocketException ?
>>> What is the error ?
>>>
>>> ---
>>> Rgds, Wilfried [TeamICS]
>>> http://www.overbyte.be/eng/overbyte/teamics.html
>>> http://www.mestdagh.biz
>>>
>>> Wednesday, November 30, 2005, 15:21, Fastream Technologies wrote:
>>>
>>>> Hello,
>>>
>>>> I chose the second method (THt

Re: [twsocket] Problem with THttpCli

2005-12-01 Thread Maurizio Lotauro
On 30-Nov-05 15:21:24 Fastream Technologies wrote:

>Hello,

>I chose the second method (THttpCli) but the below code fails in a thread:

[...]

>It gives no exception but throws ESocketError just after DNSLookup which is
>successful. I tried with www.intel.com and the IE works just fine from here.

Waht is the error?
Have you tried without using threads?


Bye, Maurizio.

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-01 Thread Wilfried Mestdagh
Hello SZ,

I think so yes, but I'm not very familiar with THttpCli component. I use
THttpSrv often but not the client.

But to come back on your error. Can you eather put a try/catch block in
all events, or try to debug with the IDE option 'break on delphi
exception' on ?  I'm pretty sure the original exception is coming from a
code fragment of you and is catched by the OnError of the ctrlSocket.

I'm not 100% sure of the LastError, I just found it in the comment on
top. I never used OnError but still it is used by THttpCli component.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, December 1, 2005, 18:50, Fastream Technologies wrote:

> THttpCli(SenderLastError reads "0" in OnSocketError.

> What is unusual about my code is that I do not use a stream nor a file to
> get the data. I want to use the OnDocData and OnHeaderData events to read
> packet-by-packet. Is this possible? If yes how?

> Regards,

> SubZ

> - Original Message - 
> From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Thursday, December 01, 2005 12:18 PM
> Subject: Re: [twsocket] Problem with THttpCli


>> Hello SZ,
>>
>>> It gives no exception but throws ESocketError just after DNSLookup which
>>> is
>>> successful.
>>
>> Do you mean ESocketException ?
>> What is the error ?
>>
>> ---
>> Rgds, Wilfried [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> http://www.mestdagh.biz
>>
>> Wednesday, November 30, 2005, 15:21, Fastream Technologies wrote:
>>
>>> Hello,
>>
>>> I chose the second method (THttpCli) but the below code fails in a 
>>> thread:
>>
>>> HTTPClient = new THttpCli(NULL);
>>> HTTPClient->MultiThreaded = true;
>>> HTTPClient->FollowRelocation = false;
>>> HTTPClient->NoCache = false;
>>> HTTPClient->RcvdStream = NULL;
>>> HTTPClient->SendStream = NULL;
>>> // all the events are assigned here
>>
>> HTTPClient->>URL = "http://"; + targetServerIP + ":" + targetServerPort +
>>> FPath;
>>
>>> if(FParams.Length())
>>> HTTPClient->URL += "?" + FParams;
>>
>>> try
>>> {
>>> HTTPClient->GetASync();
>>> }
>>> catch(...
>>
>>> It gives no exception but throws ESocketError just after DNSLookup which
>>> is
>>> successful. I tried with www.intel.com and the IE works just fine from
>>> here.
>>> I have a proxy setting for IE but that's optional and Mozilla works 
>>> without
>>> proxy ok. I also tried to point socketspy to intel.com and used browser
>>> to
>>> access localhost:8000 (the port socketspy runs on) which worked but 
>>> pointing
>>> HTTPClient did not.
>>
>>> Any help would be appreciated. I am using the November (downloaded today)
>>> beta of ICS with -yet- no SSL.
>>
>>> Best Regards,
>>
>>> SZ
>>
>>
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-01 Thread Fastream Technologies
THttpCli(SenderLastError reads "0" in OnSocketError.

What is unusual about my code is that I do not use a stream nor a file to 
get the data. I want to use the OnDocData and OnHeaderData events to read 
packet-by-packet. Is this possible? If yes how?

Regards,

SubZ

- Original Message - 
From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, December 01, 2005 12:18 PM
Subject: Re: [twsocket] Problem with THttpCli


> Hello SZ,
>
>> It gives no exception but throws ESocketError just after DNSLookup which 
>> is
>> successful.
>
> Do you mean ESocketException ?
> What is the error ?
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Wednesday, November 30, 2005, 15:21, Fastream Technologies wrote:
>
>> Hello,
>
>> I chose the second method (THttpCli) but the below code fails in a 
>> thread:
>
>> HTTPClient = new THttpCli(NULL);
>> HTTPClient->MultiThreaded = true;
>> HTTPClient->FollowRelocation = false;
>> HTTPClient->NoCache = false;
>> HTTPClient->RcvdStream = NULL;
>> HTTPClient->SendStream = NULL;
>> // all the events are assigned here
>
> HTTPClient->>URL = "http://"; + targetServerIP + ":" + targetServerPort +
>> FPath;
>
>> if(FParams.Length())
>> HTTPClient->URL += "?" + FParams;
>
>> try
>> {
>> HTTPClient->GetASync();
>> }
>> catch(...
>
>> It gives no exception but throws ESocketError just after DNSLookup which 
>> is
>> successful. I tried with www.intel.com and the IE works just fine from 
>> here.
>> I have a proxy setting for IE but that's optional and Mozilla works 
>> without
>> proxy ok. I also tried to point socketspy to intel.com and used browser 
>> to
>> access localhost:8000 (the port socketspy runs on) which worked but 
>> pointing
>> HTTPClient did not.
>
>> Any help would be appreciated. I am using the November (downloaded today)
>> beta of ICS with -yet- no SSL.
>
>> Best Regards,
>
>> SZ
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-01 Thread Wilfried Mestdagh
Hello SZ,

I checked the source, and this event if fired when FCtrlSocket.OnError
fires. So probably you have an exeption in your code in one of the event
handlers.

I think you can get the error with:
  THttpCli(Sender).CtrlSocket.LastError;

But pretty sure it comes from one of the event handlers.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, December 1, 2005, 13:57, Fastream Technologies wrote:

> Sorry, No, not the exception but the event OnSocketError. This is 
> TNotifyEvent and has no parameters except sender.

> Regards,

> SZ

> - Original Message - 
> From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Thursday, December 01, 2005 12:18 PM
> Subject: Re: [twsocket] Problem with THttpCli


>> Hello SZ,
>>
>>> It gives no exception but throws ESocketError just after DNSLookup which
>>> is
>>> successful.
>>
>> Do you mean ESocketException ?
>> What is the error ?
>>
>> ---
>> Rgds, Wilfried [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> http://www.mestdagh.biz
>>
>> Wednesday, November 30, 2005, 15:21, Fastream Technologies wrote:
>>
>>> Hello,
>>
>>> I chose the second method (THttpCli) but the below code fails in a 
>>> thread:
>>
>>> HTTPClient = new THttpCli(NULL);
>>> HTTPClient->MultiThreaded = true;
>>> HTTPClient->FollowRelocation = false;
>>> HTTPClient->NoCache = false;
>>> HTTPClient->RcvdStream = NULL;
>>> HTTPClient->SendStream = NULL;
>>> // all the events are assigned here
>>
>> HTTPClient->>URL = "http://"; + targetServerIP + ":" + targetServerPort +
>>> FPath;
>>
>>> if(FParams.Length())
>>> HTTPClient->URL += "?" + FParams;
>>
>>> try
>>> {
>>> HTTPClient->GetASync();
>>> }
>>> catch(...
>>
>>> It gives no exception but throws ESocketError just after DNSLookup which
>>> is
>>> successful. I tried with www.intel.com and the IE works just fine from
>>> here.
>>> I have a proxy setting for IE but that's optional and Mozilla works 
>>> without
>>> proxy ok. I also tried to point socketspy to intel.com and used browser
>>> to
>>> access localhost:8000 (the port socketspy runs on) which worked but 
>>> pointing
>>> HTTPClient did not.
>>
>>> Any help would be appreciated. I am using the November (downloaded today)
>>> beta of ICS with -yet- no SSL.
>>
>>> Best Regards,
>>
>>> SZ
>>
>>
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-01 Thread Fastream Technologies
Sorry, No, not the exception but the event OnSocketError. This is 
TNotifyEvent and has no parameters except sender.

Regards,

SZ

- Original Message - 
From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, December 01, 2005 12:18 PM
Subject: Re: [twsocket] Problem with THttpCli


> Hello SZ,
>
>> It gives no exception but throws ESocketError just after DNSLookup which 
>> is
>> successful.
>
> Do you mean ESocketException ?
> What is the error ?
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Wednesday, November 30, 2005, 15:21, Fastream Technologies wrote:
>
>> Hello,
>
>> I chose the second method (THttpCli) but the below code fails in a 
>> thread:
>
>> HTTPClient = new THttpCli(NULL);
>> HTTPClient->MultiThreaded = true;
>> HTTPClient->FollowRelocation = false;
>> HTTPClient->NoCache = false;
>> HTTPClient->RcvdStream = NULL;
>> HTTPClient->SendStream = NULL;
>> // all the events are assigned here
>
> HTTPClient->>URL = "http://"; + targetServerIP + ":" + targetServerPort +
>> FPath;
>
>> if(FParams.Length())
>> HTTPClient->URL += "?" + FParams;
>
>> try
>> {
>> HTTPClient->GetASync();
>> }
>> catch(...
>
>> It gives no exception but throws ESocketError just after DNSLookup which 
>> is
>> successful. I tried with www.intel.com and the IE works just fine from 
>> here.
>> I have a proxy setting for IE but that's optional and Mozilla works 
>> without
>> proxy ok. I also tried to point socketspy to intel.com and used browser 
>> to
>> access localhost:8000 (the port socketspy runs on) which worked but 
>> pointing
>> HTTPClient did not.
>
>> Any help would be appreciated. I am using the November (downloaded today)
>> beta of ICS with -yet- no SSL.
>
>> Best Regards,
>
>> SZ
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-01 Thread Wilfried Mestdagh
Hello SZ,

> It gives no exception but throws ESocketError just after DNSLookup which is
> successful.

Do you mean ESocketException ?
What is the error ?

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, November 30, 2005, 15:21, Fastream Technologies wrote:

> Hello,

> I chose the second method (THttpCli) but the below code fails in a thread:

> HTTPClient = new THttpCli(NULL);
> HTTPClient->MultiThreaded = true;
> HTTPClient->FollowRelocation = false;
> HTTPClient->NoCache = false;
> HTTPClient->RcvdStream = NULL;
> HTTPClient->SendStream = NULL;
> // all the events are assigned here

HTTPClient->>URL = "http://"; + targetServerIP + ":" + targetServerPort +
> FPath;

> if(FParams.Length())
> HTTPClient->URL += "?" + FParams;

> try
> {
> HTTPClient->GetASync();
> }
> catch(...

> It gives no exception but throws ESocketError just after DNSLookup which is
> successful. I tried with www.intel.com and the IE works just fine from here.
> I have a proxy setting for IE but that's optional and Mozilla works without
> proxy ok. I also tried to point socketspy to intel.com and used browser to
> access localhost:8000 (the port socketspy runs on) which worked but pointing
> HTTPClient did not.

> Any help would be appreciated. I am using the November (downloaded today)
> beta of ICS with -yet- no SSL.

> Best Regards,

> SZ 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-01 Thread Fastream Technologies
Sure. I handle our custom messages and if it is not one of them, I call 
DispatchMessage(msg); (from WinAPI)

Regards,

SubZ

- Original Message - 
From: "Arno Garrels" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, December 01, 2005 10:45 AM
Subject: Re: [twsocket] Problem with THttpCli


> Fastream Technologies wrote:
>> I thought I would not need to call ThreadAttach when I create THttpCli
>> instance in thread context. Other than that, it is so simple code I see 
>> no
>> problem but it does not work despite that...;(
>
> Do you call a message pump somewhere?
>
>
> ---
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
>
>
>>
>> - Original Message -
>> From: "Arno Garrels" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" 
>> Sent: Wednesday, November 30, 2005 7:28 PM
>> Subject: Re: [twsocket] Problem with THttpCli
>>
>>
>>> Fastream Technologies wrote:
>>>> Any help would be appreciated. I am using the November (downloaded
>>>> today) beta of ICS with -yet- no SSL.
>>>
>>> Hard to say, however I guess it is a multi threading problem.
>>>
>>> ---
>>> Arno Garrels [TeamICS]
>>> http://www.overbyte.be/eng/overbyte/teamics.html
>>>
>>> --
>>> To unsubscribe or change your settings for TWSocket mailing list
>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>> Visit our website at http://www.overbyte.be
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-01 Thread Arno Garrels
Fastream Technologies wrote:
> I thought I would not need to call ThreadAttach when I create THttpCli
> instance in thread context. Other than that, it is so simple code I see no
> problem but it does not work despite that...;(

Do you call a message pump somewhere?


---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html


> 
> - Original Message -
> From: "Arno Garrels" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Wednesday, November 30, 2005 7:28 PM
> Subject: Re: [twsocket] Problem with THttpCli
> 
> 
>> Fastream Technologies wrote:
>>> Any help would be appreciated. I am using the November (downloaded
>>> today) beta of ICS with -yet- no SSL.
>> 
>> Hard to say, however I guess it is a multi threading problem.
>> 
>> ---
>> Arno Garrels [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> 
>> --
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-12-01 Thread Fastream Technologies
I thought I would not need to call ThreadAttach when I create THttpCli 
instance in thread context. Other than that, it is so simple code I see no 
problem but it does not work despite that...;(

Regards,

SZ

- Original Message - 
From: "Arno Garrels" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, November 30, 2005 7:28 PM
Subject: Re: [twsocket] Problem with THttpCli


> Fastream Technologies wrote:
>> Any help would be appreciated. I am using the November (downloaded today)
>> beta of ICS with -yet- no SSL.
>
> Hard to say, however I guess it is a multi threading problem.
>
> ---
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with THttpCli

2005-11-30 Thread Arno Garrels
Fastream Technologies wrote:
> Any help would be appreciated. I am using the November (downloaded today)
> beta of ICS with -yet- no SSL.

Hard to say, however I guess it is a multi threading problem.

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Problem with THttpCli

2005-11-30 Thread Fastream Technologies
Hello,

I chose the second method (THttpCli) but the below code fails in a thread:

HTTPClient = new THttpCli(NULL);
HTTPClient->MultiThreaded = true;
HTTPClient->FollowRelocation = false;
HTTPClient->NoCache = false;
HTTPClient->RcvdStream = NULL;
HTTPClient->SendStream = NULL;
// all the events are assigned here

HTTPClient->URL = "http://"; + targetServerIP + ":" + targetServerPort + 
FPath;

if(FParams.Length())
HTTPClient->URL += "?" + FParams;

try
{
HTTPClient->GetASync();
}
catch(...

It gives no exception but throws ESocketError just after DNSLookup which is 
successful. I tried with www.intel.com and the IE works just fine from here. 
I have a proxy setting for IE but that's optional and Mozilla works without 
proxy ok. I also tried to point socketspy to intel.com and used browser to 
access localhost:8000 (the port socketspy runs on) which worked but pointing 
HTTPClient did not.

Any help would be appreciated. I am using the November (downloaded today) 
beta of ICS with -yet- no SSL.

Best Regards,

SZ 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be