Re: [twsocket] best way to reset HttpCli
Make a property for it in the derived class then. This method would be much faster than object recreation! On Sat, Oct 18, 2008 at 11:38 PM, brian <[EMAIL PROTECTED]> wrote: > I can't access FMsg_WM_HTTP_SET_READY because it's under Protected > > - Original Message - > From: "Paul" <[EMAIL PROTECTED]> > To: "ICS support mailing" > Sent: Saturday, October 18, 2008 21:40 > Subject: Re: [twsocket] best way to reset HttpCli > > > >I think so, > > > > If you call Abort, OnRequestdone will be triggered. > > You can set a flag when you call abort, and then you can take action in > > OnRequestdone. > > You problably have to free some streams anyway, which are usually freed > in > > OnRequestdone. > > > > Paul > > > > > > > > - Original Message - > > From: "brian" <[EMAIL PROTECTED]> > > To: "ICS support mailing" > > Sent: Saturday, October 18, 2008 9:15 PM > > Subject: Re: [twsocket] best way to reset HttpCli > > > > > >> You mean I should post the message and wait for the next call until > >> OnRequestDone triggers? > >> > >> where is FMsg_WM_HTTP_SET_READY defined? > >> > >> thanks > >> > >> - Original Message - > >> From: "Fastream Technologies" <[EMAIL PROTECTED]> > >> To: "ICS support mailing" > >> Sent: Saturday, October 18, 2008 15:47 > >> Subject: Re: [twsocket] best way to reset HttpCli > >> > >> > >>>I reported this as BUG in 2007. Then nobody seemed to find a real > >>>solution > >>> and I found a workaround: > >>> > >>> I created a descendent in C++ and, > >>> > >>> void __fastcall httpClient::SetReady() > >>> { > >>> if(alreadySetReady) > >>> return; > >>> alreadySetReady = true; > >>> PostMessage(FHandle, FMsg_WM_HTTP_SET_READY, 0, 0); > >>> } > >>> > //--- > >>> alreadysettrue is reset before each get/head/postasync. Then you should > >>> enter your next call in ONRequestdone. It has complex reasons yet if > you > >>> really want to know, breakpoint the original setready. > >>> > >>> Regards, > >>> > >>> SZ > >>> > >>> On Sat, Oct 18, 2008 at 3:16 PM, brian <[EMAIL PROTECTED]> wrote: > >>> > Hi, > > I am using a httpcli created on run-time. I first connect to a > website, > and > after DocEnd I call another procedure that changes the event > procedures > and > connects to a different website. On the 2nd call I get an Exception > "HTTP > component is busy", so I do this before trying the 2nd call > > try > LoginSocket.Abort; > except > end; > > that, however, generates another exception. Checking the httpcli state > before the abort, it is "Waiting Body" > > What is the best way to "reset" the component between both calls and > leave > it in a "Ready" state? The first call is GetAsync and the 2nd one is > PostAsync. > -- > 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 > >> > >> -- > >> 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 > > -- > 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 > -- Gorkem Ates Fastream Technologies Software IQ: Innovation & Quality www.fastream.com | Email: [EMAIL PROTECTED] | Tel: +90-312-223-2830 | MSN: [EMAIL PROTECTED] Join IQWF Server Yahoo group at http://groups.yahoo.com/group/IQWFServer Join IQ Reverse Proxy Yahoo group at http://groups.yahoo.com/group/IQReverseProxy -- 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] best way to reset HttpCli
I've decided to just free/re-create the httpcli at run-time, works the best. thanks - Original Message - From: "Paul" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Saturday, October 18, 2008 21:40 Subject: Re: [twsocket] best way to reset HttpCli >I think so, > > If you call Abort, OnRequestdone will be triggered. > You can set a flag when you call abort, and then you can take action in > OnRequestdone. > You problably have to free some streams anyway, which are usually freed in > OnRequestdone. > > Paul > > > > - Original Message - > From: "brian" <[EMAIL PROTECTED]> > To: "ICS support mailing" > Sent: Saturday, October 18, 2008 9:15 PM > Subject: Re: [twsocket] best way to reset HttpCli > > >> You mean I should post the message and wait for the next call until >> OnRequestDone triggers? >> >> where is FMsg_WM_HTTP_SET_READY defined? >> >> thanks >> >> - Original Message - >> From: "Fastream Technologies" <[EMAIL PROTECTED]> >> To: "ICS support mailing" >> Sent: Saturday, October 18, 2008 15:47 >> Subject: Re: [twsocket] best way to reset HttpCli >> >> >>>I reported this as BUG in 2007. Then nobody seemed to find a real >>>solution >>> and I found a workaround: >>> >>> I created a descendent in C++ and, >>> >>> void __fastcall httpClient::SetReady() >>> { >>> if(alreadySetReady) >>> return; >>> alreadySetReady = true; >>> PostMessage(FHandle, FMsg_WM_HTTP_SET_READY, 0, 0); >>> } >>> //--- >>> alreadysettrue is reset before each get/head/postasync. Then you should >>> enter your next call in ONRequestdone. It has complex reasons yet if you >>> really want to know, breakpoint the original setready. >>> >>> Regards, >>> >>> SZ >>> >>> On Sat, Oct 18, 2008 at 3:16 PM, brian <[EMAIL PROTECTED]> wrote: >>> Hi, I am using a httpcli created on run-time. I first connect to a website, and after DocEnd I call another procedure that changes the event procedures and connects to a different website. On the 2nd call I get an Exception "HTTP component is busy", so I do this before trying the 2nd call try LoginSocket.Abort; except end; that, however, generates another exception. Checking the httpcli state before the abort, it is "Waiting Body" What is the best way to "reset" the component between both calls and leave it in a "Ready" state? The first call is GetAsync and the 2nd one is PostAsync. -- 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 >> >> -- >> 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 -- 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] best way to reset HttpCli
I can't access FMsg_WM_HTTP_SET_READY because it's under Protected - Original Message - From: "Paul" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Saturday, October 18, 2008 21:40 Subject: Re: [twsocket] best way to reset HttpCli >I think so, > > If you call Abort, OnRequestdone will be triggered. > You can set a flag when you call abort, and then you can take action in > OnRequestdone. > You problably have to free some streams anyway, which are usually freed in > OnRequestdone. > > Paul > > > > - Original Message - > From: "brian" <[EMAIL PROTECTED]> > To: "ICS support mailing" > Sent: Saturday, October 18, 2008 9:15 PM > Subject: Re: [twsocket] best way to reset HttpCli > > >> You mean I should post the message and wait for the next call until >> OnRequestDone triggers? >> >> where is FMsg_WM_HTTP_SET_READY defined? >> >> thanks >> >> - Original Message - >> From: "Fastream Technologies" <[EMAIL PROTECTED]> >> To: "ICS support mailing" >> Sent: Saturday, October 18, 2008 15:47 >> Subject: Re: [twsocket] best way to reset HttpCli >> >> >>>I reported this as BUG in 2007. Then nobody seemed to find a real >>>solution >>> and I found a workaround: >>> >>> I created a descendent in C++ and, >>> >>> void __fastcall httpClient::SetReady() >>> { >>> if(alreadySetReady) >>> return; >>> alreadySetReady = true; >>> PostMessage(FHandle, FMsg_WM_HTTP_SET_READY, 0, 0); >>> } >>> //--- >>> alreadysettrue is reset before each get/head/postasync. Then you should >>> enter your next call in ONRequestdone. It has complex reasons yet if you >>> really want to know, breakpoint the original setready. >>> >>> Regards, >>> >>> SZ >>> >>> On Sat, Oct 18, 2008 at 3:16 PM, brian <[EMAIL PROTECTED]> wrote: >>> Hi, I am using a httpcli created on run-time. I first connect to a website, and after DocEnd I call another procedure that changes the event procedures and connects to a different website. On the 2nd call I get an Exception "HTTP component is busy", so I do this before trying the 2nd call try LoginSocket.Abort; except end; that, however, generates another exception. Checking the httpcli state before the abort, it is "Waiting Body" What is the best way to "reset" the component between both calls and leave it in a "Ready" state? The first call is GetAsync and the 2nd one is PostAsync. -- 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 >> >> -- >> 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 -- 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] HttpsCli in service application
Angus Robertson - Magenta Systems Ltd wrote: > 2 - Use the SvCom service environment, which allows you to create a > application that may be run as either a GUI or service. > > http://www.aldyn-software.com/svcom.html > > I've used this for one new application, and it works nicely, although > I had to fix a couple of SvCom bugs to make it work. Support is also > sporadic. That seems to be the nature of all russian hacks _I_ tried so far :( > My application (ComCap) has a tick box that self installs > or deinstalls itself as a service, and allows itself to be run as a > service and GUI at the same time, with a socket sending data for > display from the service, and sending back commands. > > Sorry, don't know if Arno's DDService has the same ability, No it has not, it's 'simply' a extension of TService and TServiceAplication. Wilfried provides a very nice example/class on his website which demonstrates how easy it is to run the same application as a GUI or as a NT service. URL: http://www.mestdagh.biz or download the source directly from: http://www.mestdagh.biz/delphi_comp/service.zip. -- Arno -- 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] best way to reset HttpCli
I think so, If you call Abort, OnRequestdone will be triggered. You can set a flag when you call abort, and then you can take action in OnRequestdone. You problably have to free some streams anyway, which are usually freed in OnRequestdone. Paul - Original Message - From: "brian" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Saturday, October 18, 2008 9:15 PM Subject: Re: [twsocket] best way to reset HttpCli > You mean I should post the message and wait for the next call until > OnRequestDone triggers? > > where is FMsg_WM_HTTP_SET_READY defined? > > thanks > > - Original Message - > From: "Fastream Technologies" <[EMAIL PROTECTED]> > To: "ICS support mailing" > Sent: Saturday, October 18, 2008 15:47 > Subject: Re: [twsocket] best way to reset HttpCli > > >>I reported this as BUG in 2007. Then nobody seemed to find a real solution >> and I found a workaround: >> >> I created a descendent in C++ and, >> >> void __fastcall httpClient::SetReady() >> { >> if(alreadySetReady) >> return; >> alreadySetReady = true; >> PostMessage(FHandle, FMsg_WM_HTTP_SET_READY, 0, 0); >> } >> //--- >> alreadysettrue is reset before each get/head/postasync. Then you should >> enter your next call in ONRequestdone. It has complex reasons yet if you >> really want to know, breakpoint the original setready. >> >> Regards, >> >> SZ >> >> On Sat, Oct 18, 2008 at 3:16 PM, brian <[EMAIL PROTECTED]> wrote: >> >>> Hi, >>> >>> I am using a httpcli created on run-time. I first connect to a website, >>> and >>> after DocEnd I call another procedure that changes the event procedures >>> and >>> connects to a different website. On the 2nd call I get an Exception >>> "HTTP >>> component is busy", so I do this before trying the 2nd call >>> >>> try >>>LoginSocket.Abort; >>> except >>> end; >>> >>> that, however, generates another exception. Checking the httpcli state >>> before the abort, it is "Waiting Body" >>> >>> What is the best way to "reset" the component between both calls and >>> leave >>> it in a "Ready" state? The first call is GetAsync and the 2nd one is >>> PostAsync. >>> -- >>> 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 > > -- > 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
Re: [twsocket] best way to reset HttpCli
You mean I should post the message and wait for the next call until OnRequestDone triggers? where is FMsg_WM_HTTP_SET_READY defined? thanks - Original Message - From: "Fastream Technologies" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Saturday, October 18, 2008 15:47 Subject: Re: [twsocket] best way to reset HttpCli >I reported this as BUG in 2007. Then nobody seemed to find a real solution > and I found a workaround: > > I created a descendent in C++ and, > > void __fastcall httpClient::SetReady() > { > if(alreadySetReady) > return; > alreadySetReady = true; > PostMessage(FHandle, FMsg_WM_HTTP_SET_READY, 0, 0); > } > //--- > alreadysettrue is reset before each get/head/postasync. Then you should > enter your next call in ONRequestdone. It has complex reasons yet if you > really want to know, breakpoint the original setready. > > Regards, > > SZ > > On Sat, Oct 18, 2008 at 3:16 PM, brian <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> I am using a httpcli created on run-time. I first connect to a website, >> and >> after DocEnd I call another procedure that changes the event procedures >> and >> connects to a different website. On the 2nd call I get an Exception "HTTP >> component is busy", so I do this before trying the 2nd call >> >> try >>LoginSocket.Abort; >> except >> end; >> >> that, however, generates another exception. Checking the httpcli state >> before the abort, it is "Waiting Body" >> >> What is the best way to "reset" the component between both calls and >> leave >> it in a "Ready" state? The first call is GetAsync and the 2nd one is >> PostAsync. >> -- >> 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 -- 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] HttpsCli in service application
I could try, but the same class runs fine in a normal application. I've used in many services wihout problems. Only now, it has to connect to a webservice first before connecting to an application server. Logon to this application server works on de second retry (3rd try) >From then on, it works perfect .. The only difference maybe the owner of the class. The class has a constructor Create(AOwner: TComponent) In the program version, I use Create(Form1) In de service, I've tested with Create(nil) and Create(UaClient) - (service) with the same result Paul - Original Message - From: "Angus Robertson - Magenta Systems Ltd" <[EMAIL PROTECTED]> To: Sent: Saturday, October 18, 2008 8:08 PM Subject: Re: [twsocket] HttpsCli in service application >> I have a service application with a HtppsCli which has ran fine >> connecting to a server. > > Debugging service applications is a pain. Experience has shown there are > two ideal way to write service applications with Delphi. > > 1 - Write a normal windows executable, with a minimal GUI, I usually just > have a simple caption. Essentially, any GUI application will run in the > service environment, provided it never displays a interactive dialog. > Then write a service application that runs the GUI, and sends a message > to the GUI telling it when to stop when the service is stopped. I can > sent you such a service, I've been using them for many years, some run > for several months at a time. The only possible issue is if the GUI > locks up and has to be stopped with Task Manager, but it's almost > impossible to crash services anyway. > > 2 - Use the SvCom service environment, which allows you to create a > application that may be run as either a GUI or service. > > http://www.aldyn-software.com/svcom.html > > I've used this for one new application, and it works nicely, although I > had to fix a couple of SvCom bugs to make it work. Support is also > sporadic. My application (ComCap) has a tick box that self installs or > deinstalls itself as a service, and allows itself to be run as a service > and GUI at the same time, with a socket sending data for display from the > service, and sending back commands. > > Sorry, don't know if Arno's DDService has the same ability, it does not > seem to be on the list, but would be a popular addition. > > My experience is that ICS behaves identically in services and GUIs, the > only development issues are allowing for different file access rights > where services don't have a logon name, or access to mapped drive letters > (without doing it themselves). > > Angus > > -- > 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
Re: [twsocket] HttpsCli in service application
> I have a service application with a HtppsCli which has ran fine > connecting to a server. Debugging service applications is a pain. Experience has shown there are two ideal way to write service applications with Delphi. 1 - Write a normal windows executable, with a minimal GUI, I usually just have a simple caption. Essentially, any GUI application will run in the service environment, provided it never displays a interactive dialog. Then write a service application that runs the GUI, and sends a message to the GUI telling it when to stop when the service is stopped. I can sent you such a service, I've been using them for many years, some run for several months at a time. The only possible issue is if the GUI locks up and has to be stopped with Task Manager, but it's almost impossible to crash services anyway. 2 - Use the SvCom service environment, which allows you to create a application that may be run as either a GUI or service. http://www.aldyn-software.com/svcom.html I've used this for one new application, and it works nicely, although I had to fix a couple of SvCom bugs to make it work. Support is also sporadic. My application (ComCap) has a tick box that self installs or deinstalls itself as a service, and allows itself to be run as a service and GUI at the same time, with a socket sending data for display from the service, and sending back commands. Sorry, don't know if Arno's DDService has the same ability, it does not seem to be on the list, but would be a popular addition. My experience is that ICS behaves identically in services and GUIs, the only development issues are allowing for different file access rights where services don't have a logon name, or access to mapped drive letters (without doing it themselves). Angus -- 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] HttpsCli in service application
I can't image that is has something to do with the message loop. Once connected to the second webservice, it keeps running fine. There's a differenent behaviour between a service application and a normal program though. And bebugging a service is not as easy either .. Paul - Original Message - From: "Arno Garrels" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Saturday, October 18, 2008 6:54 PM Subject: Re: [twsocket] HttpsCli in service application > Paul wrote: >> This is the service execute : >> >> procedure TRpUaClnt.DDServiceExecute(Sender: TDDService); >> begin >> FHandle:= RpUaClnt.ServiceWindow; >> UaClient.OnDisplay:= Display; >> UaClient.StartApplication; >> while not terminated do >>try >> ServiceThread.ProcessRequests(true); >>except >> on E: exception do >>begin >> Display('Error occured @ ' + DateTimeToStr(now) + >> ' - ' + E.Message, ntlError); >>end; >>end; >> end; > > Looks well :-( Message loop is started properly. > Hard to tell what might be wrong? > > -- > Arno Garrels > >> >> Paul >> >> >> - Original Message - >> From: "Arno Garrels" <[EMAIL PROTECTED]> >> To: "ICS support mailing" >> Sent: Saturday, October 18, 2008 5:07 PM >> Subject: Re: [twsocket] HttpsCli in service application >> >> >>> Paul wrote: > Where to you create your class? in ServiceStart > Async or sync methods? Async > Maybe messages are not processed properly. > Are there more threads beside main thread and service thread? It's directlly in the service thread (with message loop) >>> >>> Is TService.OnExecute assigned? >>> If not, the service thread runs its message loop >>> ProcessRequests(FALSE) when OnStart is left, calling another message >>> loop in OnStart won't be a good idea. If you assigned >>> TService.OnExecute you should show some code. >>> > What ICS version do you use? It's still V5 >>> >>> Provided you added the old SSL-fixes to v5 posted to ICS-SSL last >>> year and to this list recently I have no idea what else might be >>> wrong. >>> If it works in the GUI application it's likely a bug in your service >>> code? >>> >>> -- >>> Arno Garrels >>> >>> -- >>> 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 > -- 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] HttpsCli in service application
Paul wrote: > This is the service execute : > > procedure TRpUaClnt.DDServiceExecute(Sender: TDDService); > begin > FHandle:= RpUaClnt.ServiceWindow; > UaClient.OnDisplay:= Display; > UaClient.StartApplication; > while not terminated do >try > ServiceThread.ProcessRequests(true); >except > on E: exception do >begin > Display('Error occured @ ' + DateTimeToStr(now) + > ' - ' + E.Message, ntlError); >end; >end; > end; Looks well :-( Message loop is started properly. Hard to tell what might be wrong? -- Arno Garrels > > Paul > > > - Original Message - > From: "Arno Garrels" <[EMAIL PROTECTED]> > To: "ICS support mailing" > Sent: Saturday, October 18, 2008 5:07 PM > Subject: Re: [twsocket] HttpsCli in service application > > >> Paul wrote: Where to you create your class? >>> in ServiceStart >>> Async or sync methods? >>> Async >>> Maybe messages are not processed properly. Are there more threads beside main thread and service thread? >>> It's directlly in the service thread (with message loop) >> >> Is TService.OnExecute assigned? >> If not, the service thread runs its message loop >> ProcessRequests(FALSE) when OnStart is left, calling another message >> loop in OnStart won't be a good idea. If you assigned >> TService.OnExecute you should show some code. >> >>> What ICS version do you use? >>> It's still V5 >> >> Provided you added the old SSL-fixes to v5 posted to ICS-SSL last >> year and to this list recently I have no idea what else might be >> wrong. >> If it works in the GUI application it's likely a bug in your service >> code? >> >> -- >> Arno Garrels >> >> -- >> 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
Re: [twsocket] HttpsCli in service application
This is the service execute : procedure TRpUaClnt.DDServiceExecute(Sender: TDDService); begin FHandle:= RpUaClnt.ServiceWindow; UaClient.OnDisplay:= Display; UaClient.StartApplication; while not terminated do try ServiceThread.ProcessRequests(true); except on E: exception do begin Display('Error occured @ ' + DateTimeToStr(now) + ' - ' + E.Message, ntlError); end; end; end; Paul - Original Message - From: "Arno Garrels" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Saturday, October 18, 2008 5:07 PM Subject: Re: [twsocket] HttpsCli in service application > Paul wrote: >>> Where to you create your class? >> in ServiceStart >> >>> Async or sync methods? >> Async >> >>> Maybe messages are not processed properly. >>> Are there more threads beside main thread and service thread? >> It's directlly in the service thread (with message loop) > > Is TService.OnExecute assigned? > If not, the service thread runs its message loop ProcessRequests(FALSE) > when OnStart is left, calling another message loop in OnStart won't be > a good idea. If you assigned TService.OnExecute you should show some > code. > >> >>> What ICS version do you use? >> It's still V5 > > Provided you added the old SSL-fixes to v5 posted to ICS-SSL last year > and to this list recently I have no idea what else might be wrong. > If it works in the GUI application it's likely a bug in your service > code? > > -- > Arno Garrels > > -- > 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
Re: [twsocket] HttpsCli in service application
Arno Garrels wrote: > Paul wrote: >>> Where to you create your class? >> in ServiceStart >> >>> Async or sync methods? >> Async >> >>> Maybe messages are not processed properly. >>> Are there more threads beside main thread and service thread? >> It's directlly in the service thread (with message loop) > > Is TService.OnExecute assigned? > If not, the service thread runs its message loop > ProcessRequests(FALSE) when OnStart is left, calling another message Correction: ProcessRequests(TRUE) is called. > loop in OnStart won't be a good idea. If you assigned > TService.OnExecute you should show some code. > >> >>> What ICS version do you use? >> It's still V5 > > Provided you added the old SSL-fixes to v5 posted to ICS-SSL last year > and to this list recently I have no idea what else might be wrong. > If it works in the GUI application it's likely a bug in your service > code? > > -- > Arno Garrels -- 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] HttpsCli in service application
Paul wrote: >> Where to you create your class? > in ServiceStart > >> Async or sync methods? > Async > >> Maybe messages are not processed properly. >> Are there more threads beside main thread and service thread? > It's directlly in the service thread (with message loop) Is TService.OnExecute assigned? If not, the service thread runs its message loop ProcessRequests(FALSE) when OnStart is left, calling another message loop in OnStart won't be a good idea. If you assigned TService.OnExecute you should show some code. > >> What ICS version do you use? > It's still V5 Provided you added the old SSL-fixes to v5 posted to ICS-SSL last year and to this list recently I have no idea what else might be wrong. If it works in the GUI application it's likely a bug in your service code? -- Arno Garrels -- 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] best way to reset HttpCli
I reported this as BUG in 2007. Then nobody seemed to find a real solution and I found a workaround: I created a descendent in C++ and, void __fastcall httpClient::SetReady() { if(alreadySetReady) return; alreadySetReady = true; PostMessage(FHandle, FMsg_WM_HTTP_SET_READY, 0, 0); } //--- alreadysettrue is reset before each get/head/postasync. Then you should enter your next call in ONRequestdone. It has complex reasons yet if you really want to know, breakpoint the original setready. Regards, SZ On Sat, Oct 18, 2008 at 3:16 PM, brian <[EMAIL PROTECTED]> wrote: > Hi, > > I am using a httpcli created on run-time. I first connect to a website, and > after DocEnd I call another procedure that changes the event procedures and > connects to a different website. On the 2nd call I get an Exception "HTTP > component is busy", so I do this before trying the 2nd call > > try >LoginSocket.Abort; > except > end; > > that, however, generates another exception. Checking the httpcli state > before the abort, it is "Waiting Body" > > What is the best way to "reset" the component between both calls and leave > it in a "Ready" state? The first call is GetAsync and the 2nd one is > PostAsync. > -- > 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
Re: [twsocket] TPop3Cli header...
Hello, Thanks for the response. Will the 'From:' and 'Received:' lines always be the text for the lines. Or will it be translated to X language? Ciao, Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francois PIETTE Sent: Saturday, October 18, 2008 3:02 AM To: ICS support mailing Subject: Re: [twsocket] TPop3Cli header... > I am using V5. > > This is all part of automated alarming logic. > > I need to verify that some user responded to an alarm email. I just > need to check the email address against a list. > > I see in the header the first line is Return-path: > > Will it be that format/language for all mail servers on the planet. :) It is not the case. You may evan have no return-path at all. You should better fook at the "Fom:" line. By the way, the from line can easily be forged to anything. You may also have a look at the "Received:" lines. There is one per hop between sender and receiver. Note that tehre are some variations on what you can find in the "received:" lines. The lines are in reverse order of hop traversal. You should find your own ISP on the first line. -- [EMAIL PROTECTED] 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
Re: [twsocket] HttpsCli in service application
> Where to you create your class? in ServiceStart >Async or sync methods? Async >Maybe messages are not processed properly. >Are there more threads beside main thread and service thread? It's directlly in the service thread (with message loop) >What ICS version do you use? It's still V5 Paul -- 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
[twsocket] best way to reset HttpCli
Hi, I am using a httpcli created on run-time. I first connect to a website, and after DocEnd I call another procedure that changes the event procedures and connects to a different website. On the 2nd call I get an Exception "HTTP component is busy", so I do this before trying the 2nd call try LoginSocket.Abort; except end; that, however, generates another exception. Checking the httpcli state before the abort, it is "Waiting Body" What is the best way to "reset" the component between both calls and leave it in a "Ready" state? The first call is GetAsync and the 2nd one is PostAsync. -- 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] HttpsCli in service application
Paul wrote: > I have a service application with a HtppsCli which has ran fine > connecting to a server. > Now, I need the HttpsCli connecting to another webservice first. > Connecting to this new webservices runs fine, but when the HttpsCli > connects to another webservice afterwards, it goes wrong: > The first time it connects, I get a timeout. > The second time, I get an errorcode=0 and a statuscode=0 > The third time it works. > Since the client-package is stored in a single class, I have made a > quick test in a regular program and there it runs fine. > I have tested using NOFORMS, set multithreaded property, but that > doesn't help. Where to you create your class? Async or sync methods? Maybe messages are not processed properly. Are there more threads beside main thread and service thread? What ICS version do you use? -- Arno -- 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
[twsocket] HttpsCli in service application
Hi, I have a service application with a HtppsCli which has ran fine connecting to a server. Now, I need the HttpsCli connecting to another webservice first. Connecting to this new webservices runs fine, but when the HttpsCli connects to another webservice afterwards, it goes wrong: The first time it connects, I get a timeout. The second time, I get an errorcode=0 and a statuscode=0 The third time it works. Since the client-package is stored in a single class, I have made a quick test in a regular program and there it runs fine. I have tested using NOFORMS, set multithreaded property, but that doesn't help. I have tested it also with Arno's excellect service framework, but it's still the same. Does anyone have a clue of what's going wrong here ? thanks, Paul -- 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] TPop3Cli header...
> I am using V5. > > This is all part of automated alarming logic. > > I need to verify that some user responded to an alarm email. I just need > to > check the email address against a list. > > I see in the header the first line is Return-path: > > Will it be that format/language for all mail servers on the planet. :) It is not the case. You may evan have no return-path at all. You should better fook at the "Fom:" line. By the way, the from line can easily be forged to anything. You may also have a look at the "Received:" lines. There is one per hop between sender and receiver. Note that tehre are some variations on what you can find in the "received:" lines. The lines are in reverse order of hop traversal. You should find your own ISP on the first line. -- [EMAIL PROTECTED] 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