[twsocket] 100% CPU usage if data is not processed immediately

2007-09-26 Thread Olivier Sannier
); { to avoid 100% CPU } At line 4231, right after the end of the try except block. To me this has little to no effect as the sleep is only done when bMore is True. What do you think of this proposal? Any comments are welcome. Regards Olivier Sannier -- To unsubscribe or change your settings

Re: [twsocket] 100% CPU usage if data is not processed immediately

2007-09-26 Thread Olivier Sannier
Wilfried Mestdagh wrote: Hello Olivier, The NotifyDataAvailable sets a flag in an object associated to the client socket that will then read the available bytes. But it will not do so immediately That's the problem. You have to read all available data In the OnDataAvailable

Re: [twsocket] 100% CPU usage if data is not processed immediately

2007-09-27 Thread Olivier Sannier
Wilfried Mestdagh wrote: Hello Olivier, I can't use LineMode, what is transferred is purely binary. See http://wiki.overbyte.be/wiki/index.php/Sending_and_receiving_data that discusses some possible data transfer modes. Thanks for that link. My code is for a transport layer

Re: [twsocket] 100% CPU usage if data is not processed immediately

2007-09-27 Thread Olivier Sannier
Francois Piette wrote: Designing a system having in mind variable length data will result in a better system. Variable length can do fixed length easily, not the reverse. It is variable length, but I'm only writing the socket layer. Basically, I'm given data in an unknown form and being

[twsocket] Custom message pump: wait for attach?

2007-09-27 Thread Olivier Sannier
Hi, I have written my own message pump for my project so that I can do additional processing inside the execute method of the thread. I based my code on what ThrdSrvV2 is showing but moved on to having multiple sockets per threads instead of one thread per client like what the demo is doing.

Re: [twsocket] Custom message pump: wait for attach?

2007-10-01 Thread Olivier Sannier
Wilfried Mestdagh wrote: Hello Olivier, Oke I see. But if you have all your clients attached to same thread, then it is more easyer to create / destroy the server in that thread, and you dont have to worry about it at all. Yes, I know, but I definitely prefer to have the server(s) in one

Re: [twsocket] Using SourceForge for ICS ?

2007-10-02 Thread Olivier Sannier
about 15 minutes of using it. If you have any question, please do not hesitate to contact me. Cheers Olivier -- Olivier Sannier [EMAIL PROTECTED] http://www.obones.com/ Retrouvez-moi sur Viaduc : http://www.viaduc.com/invitationpersonnelle/0023asu3wwgwpzx -- To unsubscribe or change your settings

Re: [twsocket] TWSocketThrdServer - Bogus OnDataAvailable triggeredwhen Closed.

2007-10-03 Thread Olivier Sannier
Isn't it what CloseDelayed is meant for? Francois Piette wrote: You should call Shutdown to gracefully close the connection. If you want to call close, do it using an intermediate custom message. -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare

Re: [twsocket] Not enough storage error in XSocketAllocateHWnd

2008-05-26 Thread Olivier Sannier
, Why don't you upgrade to v6? It was designed for sharing hidden Windows. Best Regards, SZ On Mon, May 26, 2008 at 3:23 PM, Olivier Sannier [EMAIL PROTECTED] wrote: Hi all, I have a server here with parts of it written using Indy and parts of it written using ICS. The two parts

[twsocket] Not enough storage error in XSocketAllocateHWnd

2008-05-26 Thread Olivier Sannier
Hi all, I have a server here with parts of it written using Indy and parts of it written using ICS. The two parts are distinct, listen on different ports and do not share any resources. Basically, I'm looking at replacing Indy with ICS and would like to have both technologies in one service to

Re: [twsocket] Not enough storage error in XSocketAllocateHWnd

2008-05-28 Thread Olivier Sannier
Arno Garrels wrote: Fastream Technologies wrote: Upgrading might be simpler than you think. Just rename ICSv5 folder, unzip and install v6 package and then rename all ICS unit names so that they start with OverbyteIcs Indeed it is easy, however if you have derived classes with

Re: [twsocket] Not enough storage error in XSocketAllocateHWnd

2008-05-28 Thread Olivier Sannier
DZ-Jay wrote: On May 26, 2008, at 09:55, Arno Garrels wrote: There is a maximum number of user handles, per-process (default 1), and system-wide (AFAIK $), so this error seems perfectly OK. Maybe your application leaks handles? If not, you may want to try to increase the maximum

Re: [twsocket] Not enough storage error in XSocketAllocateHWnd

2008-06-04 Thread Olivier Sannier
Olivier Sannier wrote: Arno Garrels wrote: Fastream Technologies wrote: Upgrading might be simpler than you think. Just rename ICSv5 folder, unzip and install v6 package and then rename all ICS unit names so that they start with OverbyteIcs Indeed it is easy

Re: [twsocket] Not enough storage error in XSocketAllocateHWnd

2008-06-05 Thread Olivier Sannier
Arno Garrels wrote: Olivier Sannier wrote: Thanks for the information. I did moved to v6 and had to adapt a few things (would have been nice if Disposed in TIcsWndControl had been protected and not private) but it did not help at first. Why? Because as soon as all connected clients would

Re: [twsocket] Socket throughput optimizations

2008-06-19 Thread Olivier Sannier
Francois PIETTE wrote: Here are a few ideas to get high performances: 4) Enlarge winsock buffers 5) Enlarge TWSocket send buffer (BufSize property) to mach actual network packet size. By default BufSize is the size of a standard ethernet packet. What values would you recommend for a

Re: [twsocket] processmessages or messagepump

2008-07-18 Thread Olivier Sannier
Francois PIETTE wrote: So in execute is it Ok to: while not terminated do begin WSocket.MessagePump; // check if I need to do something sleep(100); end; // close it all down Or am I missing the point in the use of the message pump? Yes, you miss something. The code you've

Re: [twsocket] ICS-SSL now released as freeware. ICS is ready for Tiburon. Version Control repository for ICS

2008-08-13 Thread Olivier Sannier
Hi, Many thanks for this, it will prove useful for many, especially the SVN repository. However, there is one thing that could prove annoying: The repository has been setup on a non standard port via HTTP which means that many users won't be able to access it because of security policies in

[twsocket] GWndHandlerPool is freed before sockets are destroyed

2008-10-10 Thread Olivier Sannier
Hi, I just ported an application to ICSv6 and I'm encountering a problem when closing it down. It gives me an access violation in ntdll.dll, write of address 0010 Digging around, I discovered that it comes from the call to GWndHandlerPool.Lock inside TIcsWndControl.DeallocateHWnd At the

Re: [twsocket] GWndHandlerPool is freed before sockets are destroyed

2008-10-10 Thread Olivier Sannier
Olivier Sannier wrote: In my own section, I'm freeing, indirectly, a class that contains a TWSocketServer which not active. I know this comes from the indirect nature of my usage of the class, but still, the order of finalization clauses should not be relied upon, as it was always

Re: [twsocket] GWndHandlerPool is freed before sockets are destroyed

2008-10-10 Thread Olivier Sannier
Hello, Francois Piette wrote: you add OverbyteIcsWndControl in front (well after other higher priority units such as FastMM4) of the dpr uses clause, the issue should go away. Please check and tell me what. Yes, it works. But I don't really like having useless uses in the dpr, and this is

Re: [twsocket] GWndHandlerPool is freed before sockets are destroyed

2008-10-15 Thread Olivier Sannier
Francois PIETTE wrote: About your changes: It's sure that using FreeAndNil is a good idea. Checking Assigned(GWndHandlerPool) is also good but be aware that this would hide the exception and still may produce unexpected results since the lock is no more used. If you some reason a thread

Re: [twsocket] GWndHandlerPool is freed before sockets are destroyed

2008-10-15 Thread Olivier Sannier
Olivier Sannier wrote: I'll try to figure out a way to do this and will submit a patch when I get it working properly. Ok, figured it out quite easily. Please see the proposed patch at the end of this message. The only question is whether or not I could have read GWndHandleCount directly

[twsocket] Patch: Overridden is written with two ds

2008-10-15 Thread Olivier Sannier
Hi, I just discovered that overridden has been misspelled in a number of places throughout ICS where it was written with one d. But in proper English, it should take two ds. I know that most authors of ICS do not have English as their native language, and this is not a big deal, but now that

Re: [twsocket] GWndHandlerPool is freed before sockets are destroyed

2008-11-12 Thread Olivier Sannier
Hi all, Any reactions on this? Cheers Olivier Olivier Sannier wrote: Olivier Sannier wrote: I'll try to figure out a way to do this and will submit a patch when I get it working properly. Ok, figured it out quite easily. Please see the proposed patch at the end

Re: [twsocket] GWndHandlerPool is freed before sockets are destroyed

2008-11-15 Thread Olivier Sannier
Arno Garrels wrote: Olivier Sannier wrote: Assert(Assigned(GWndHandlerPool), 'GWndHandlerPool is already nil, check your threads!!!'); I just wonder whether we shouldn't check not GUnitFinalized rather than Assigned(GWndHandlerPool), what do you think? No we should

Re: [twsocket] GWndHandlerPool is freed before sockets are destroyed

2008-11-16 Thread Olivier Sannier
Arno Garrels wrote: Olivier Sannier wrote: Arno Garrels wrote: Olivier Sannier wrote: Assert(Assigned(GWndHandlerPool), 'GWndHandlerPool is already nil, check your threads!!!'); I just wonder whether we shouldn't check not GUnitFinalized rather than Assigned

Re: [twsocket] OT: In BCB2009, is it possible to call C++ functions from inside Pascal units?

2008-11-21 Thread Olivier Sannier
Fastream Technologies wrote: Hello, Maybe somebody know a way to do it in BCB2009? It use to be impossible. Regards, SZ Still is. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website

Re: [twsocket] Builder 6 Installation and TCppWebBrowser

2008-11-25 Thread Olivier Sannier
It is used indirectly. The icsbcb package should have bcbie added to its requires list. This should solve the problem, after a rebuild. Cheers Olivier -- Olivier Sannier [EMAIL PROTECTED] http://www.obones.com/ Retrouvez-moi sur Viaduc : http://www.viaduc.com/invitationpersonnelle/0023asu3wwgwpzx

Re: [twsocket] FRANCOIS--can you HAVE A LOOK? Re: What is the properway to turn off sslv2 inTSslHttpServer and TSslContext?

2008-11-28 Thread Olivier Sannier
Fastream Technologies wrote: SslContext1-SslOptions = TSslOptions() sslOpt_NO_SSLv2; is the same as what I did, isn't it? No it's not the same. What you did does not work as it does not call the setter for the property. The only way to have it work is the above. And the same goes for your

Re: [twsocket] ICS components in RAD Studio 2007

2008-12-03 Thread Olivier Sannier
Most likely you did not have the correct paths to the include/lib paths for your project. -- 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] Freeing of sockets

2009-02-17 Thread Olivier Sannier
Destructor must be called Destroy, not Free Markus Mueller wrote: Hi Wilfried, I have created an destructor Free, which inherited runs Free of TWSocket. This Free is never called; can anybody tell me why? Are you realy sure it is freed by calling Release if it is never calling Free?!

Re: [twsocket] ICS and D2009 - Chinese data in Buffer.

2009-02-26 Thread Olivier Sannier
wayne forrest wrote: I am expecting ASCII text yet I get the Chinese Because you use your buffer as an array of byte, yet you declare it as an array of Char. In Delphi 2009 Char is Unicode, hence the chinese characters because two bytes you received are combined to form one unicode character.

Re: [twsocket] Location of TTrafficLight component and examplesource code

2009-09-17 Thread Olivier Sannier
Server seems to be down indeed -- 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] Unknown encode used on som html page

2010-04-12 Thread Olivier Sannier
Xavier Mor-Mur wrote: I write smtp client to send html email from my application. Html normally is a doc saved as html format. If there are images then their tag have SRC coded on a way I can't find how it's done. On Example at end you can see html generated using OpenOffice 3.1. There is

Re: [twsocket] Request for better Delphi version detection

2010-09-05 Thread Olivier Sannier
On 05/09/2010 21:06, Jon Robertson wrote: If ICS works in D2010, why can't the same source be recompiled in Delphi XE without change? Why must component vendors insist on forcing source code changes (even if just the .inc file) for every version, when there is very likely nothing in the new

Re: [twsocket] Request for better Delphi version detection

2010-09-05 Thread Olivier Sannier
On 05/09/2010 23:22, Jon Robertson wrote: But then again, you must know what you are talking about... Wow. I'm surprised by the hostility. Sorry, bad day, you're the last one on the long list of weird remarks to day... Based on your JVCL experience, are you aware of anything that should

Re: [twsocket] EnterCriticalSection(SslCritSect) called after Finalization calls DeleteCriticalSection(SslCritSect)

2013-05-11 Thread Olivier Sannier
Hello, I've seen this happen with other component sets because the components as well. The situation triggering this is yet unclear to me, but it is a combination of putting the component on a form and letting the application delete it. It appears, but I'm not quite sure, that finalization of