Re: [twsocket] SocketSpy to C++ Problem
Hi Arno, I went back over everything you provided for me and I finally got it! I have it working now. Thanks so much, Richard -- 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] Another unicode issue
Busai Péter wrote: >> I just checked in the change. If you use SVN you should revert >> previous changes before update in order to avoid conflicts, > "Resolve conflicts using 'theirs'" is just one click ;) True, forgot about it :) That's however fatal if you have uncommitted private changes. -- 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] Using the FTP Client
Maybe "background loop" is the wrong term. I have a timer generating an event every 50mS. This routine processes the data from the USB and FTP. Well, this is slightly better but still use CPU for nothing most of the time. The master idea is to have all thread sleeping almost all time and waken up only when something has to be processed. Waking a thread up every 50 mS and then checking for some condition which is probably false most of the time is a waste of CPU and introduce a delay of 50 mS in every action, even if the system is doing nothing at the wake up time. Consider using windows events (or mutex or semaphore). It's quite easy once you've got the idea. -- 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 - Original Message - From: "Graham Powell" To: "'ICS support mailing'" Sent: Friday, January 28, 2011 1:10 PM Subject: Re: [twsocket] Using the FTP Client Maybe "background loop" is the wrong term. I have a timer generating an event every 50mS. This routine processes the data from the USB and FTP. Graham -Original Message- From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On Behalf Of Francois PIETTE Sent: 28 January 2011 09:42 To: ICS support mailing Subject: Re: [twsocket] Using the FTP Client While the FTP data is being processed, the USB is continually monitored and FTP processing is interrupted to service the USB. Reading that rings the bell in my head ! If you are using polling, then this is bad design. Use two separate threads to handle USB and to handle FTP. Each thread should work purely asynchronous (as ICS does) or work blocked on a read or write (for the USB). Never use a polling loop. The USB is read by a high priority thread and stored in a buffer. The background loop monitors the USB buffer and the buffered streams from the FTP and processes accordingly. OK, but what is the "background loop" ? If it is a pure loop checking for boolean or integer variable flags, then it is bad design: you consume a lot of CPU for nothing. If it is a loop using windows events (I mean http://msdn.microsoft.com/en-us/library/ms682396(v=vs.85).aspx), semaphore or mutex, then it is probably OK. -- 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 -- 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] Using the FTP Client
> Maybe "background loop" is the wrong term. I have a timer > generating anevent every 50mS. This routine processes the data from > the USB and FTP. 50ms is virtually a continuous loop, it's very short. I'd make it 500ms and see if application performance improves. Or use a thread and create an event. 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] Using the FTP Client
Maybe "background loop" is the wrong term. I have a timer generating an event every 50mS. This routine processes the data from the USB and FTP. Graham -Original Message- From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On Behalf Of Francois PIETTE Sent: 28 January 2011 09:42 To: ICS support mailing Subject: Re: [twsocket] Using the FTP Client >> While the FTP data is being processed, the USB is continually >> monitored and FTP processing is interrupted to service the USB. > > Reading that rings the bell in my head ! > If you are using polling, then this is bad design. > Use two separate threads to handle USB and to handle FTP. Each thread > should work purely asynchronous (as ICS does) or work blocked on a > read or write (for the USB). Never use a polling loop. > The USB is read by a high priority thread and stored in a buffer. The > background loop monitors the USB buffer and the buffered streams from > the FTP and processes accordingly. OK, but what is the "background loop" ? If it is a pure loop checking for boolean or integer variable flags, then it is bad design: you consume a lot of CPU for nothing. If it is a loop using windows events (I mean http://msdn.microsoft.com/en-us/library/ms682396(v=vs.85).aspx), semaphore or mutex, then it is probably OK. -- 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
Re: [twsocket] Another unicode issue
I just checked in the change. If you use SVN you should revert previous changes before update in order to avoid conflicts, "Resolve conflicts using 'theirs'" is just one click ;) Peter -- 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] Another unicode issue
Busai Péter wrote: > Sorry, they must be surrounded by defines to work in older compilers: Thanks for your help. I just checked in the change. If you use SVN you should revert previous changes before update in order to avoid conflicts, I changed a little bit more. It should be available in next daily snapshot ZIP at: http://wiki.overbyte.be/wiki/index.php/ICS_Download Or get both files via HTTP: http://svn.overbyte.be:8443/svn/ics/trunk/Delphi/Vc32/OverbyteIcsHttpSrv.pas http://svn.overbyte.be:8443/svn/ics/trunk/Delphi/Vc32/OverbyteIcsHttpAppServer.pas -- 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] Using the FTP Client
While the FTP data is being processed, the USB is continually monitored and FTP processing is interrupted to service the USB. Reading that rings the bell in my head ! If you are using polling, then this is bad design. Use two separate threads to handle USB and to handle FTP. Each thread should work purely asynchronous (as ICS does) or work blocked on a read or write (for the USB). Never use a polling loop. The USB is read by a high priority thread and stored in a buffer. The background loop monitors the USB buffer and the buffered streams from the FTP and processes accordingly. OK, but what is the "background loop" ? If it is a pure loop checking for boolean or integer variable flags, then it is bad design: you consume a lot of CPU for nothing. If it is a loop using windows events (I mean http://msdn.microsoft.com/en-us/library/ms682396(v=vs.85).aspx), semaphore or mutex, then it is probably OK. -- 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] Another unicode issue
Sorry, they must be surrounded by defines to work in older compilers: HandleTableRow(TagParams, P + J + 1, Q - P - J - 1, RowDataGetter, UserData, DestStream {$IFDEF COMPILER12_UP} , DestCodePage {$ENDIF} ); StreamWriteStrA(DestStream, TagValue {$IFDEF COMPILER12_UP} ,DestCodePage {$ENDIF} ); Peter 2011.01.27. 21:35 keltezéssel, Busai Péter írta: Hi Arno, There were two DestCodePage parameter passover missing in OverbyteIcsHttpSrv. function HtmlPageProducerFromMemory Line: 5068 HandleTableRow(TagParams, P + J + 1, Q - P - J - 1, RowDataGetter, UserData, DestStream, DestCodePage); and Line: 5076 StreamWriteStrA(DestStream, TagValue, DestCodePage); -- 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] Using the FTP Client
The USB is read by a high priority thread and stored in a buffer. The background loop monitors the USB buffer and the buffered streams from the FTP and processes accordingly. Graham -Original Message- From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On Behalf Of Francois PIETTE Sent: 27 January 2011 20:48 To: ICS support mailing Subject: Re: [twsocket] Using the FTP Client > While the FTP data is being processed, the USB is continually > monitored and FTP processing is interrupted to service the USB. Reading that rings the bell in my head ! If you are using polling, then this is bad design. Use two separate threads to handle USB and to handle FTP. Each thread should work purely asynchronous (as ICS does) or work blocked on a read or write (for the USB). Never use a polling loop. -- 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