[twsocket] hello, all, problems of THttpCli in thread

2012-08-13 Thread coolspace
Hello, everybody,

   It seems that I faced a problem of THttpCli component used in thread.

The problem is like below.

1. First in my application, I have a main form, form1, in form1, I create
an manager thread, named managerThread;

2. In the managerThread, I create THttpCli component with Nil param.

The problem is that, as THttpCli component is created in a thread, which is
also not main thread.
THttpCli.Get method always give me timeout error.


If I simplely create THttpCli in my manager thread, then everything is ok.

The reason I need managerThread is that I use this thread to do some manage
work, such as cache saving or else.

BTW: I've already set MultiThreaded to be true.

Anyone has thoughts for this problem?


Thanks

Regards
--
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


Re: [twsocket] hello, all, problems of THttpCli in thread

2012-08-13 Thread François Piette
   It seems that I faced a problem of THttpCli component used in thread.

You must create the component from the execute method, not the constructor
and your thread MUST have a message pump.
I suggest you start with one of the multithreaded samples delivered with
ICS.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be



--
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


Re: [twsocket] hello, all, problems of THttpCli in thread

2012-08-13 Thread coolspace
Really thanks. Problem solved now. As in the beginning, I create THttpCli
in thread constructor just as other components. Now after changing to
execute method. It works.

Thanks!

Regards

On Mon, Aug 13, 2012 at 3:18 PM, François Piette
francois.pie...@skynet.bewrote:

It seems that I faced a problem of THttpCli component used in thread.

 You must create the component from the execute method, not the constructor
 and your thread MUST have a message pump.
 I suggest you start with one of the multithreaded samples delivered with
 ICS.

 --
 francois.pie...@overbyte.be
 The author of the freeware multi-tier middleware MidWare
 The author of the freeware Internet Component Suite (ICS)
 http://www.overbyte.be



 --
 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

--
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