[twsocket] Shared handles problem

2013-05-17 Thread Eric Fleming Bonilha
Hello ICS team, I´m currently using your implementation of shared handles in all my applications (I have actually removed all AllocateHwnd and changed to use your implementation in your to share handles between objects and save some OS resources), and I think that I have found a flaw in the

[twsocket] RES: Shared handles problem

2013-05-17 Thread Eric Fleming Bonilha
Well I have seen that you UnregisterMessage routine already removes messages from the queue: if FHandle 0 then while PeekMessage(LMsg, FHandle, Msg, Msg, PM_REMOVE) do {loop} ; Strange.. must be something else, I will keep digging! Eric De: Eric Fleming Bonilha

[twsocket] ICS Stable for 64bits?

2013-05-16 Thread Eric Fleming Bonilha
Hello! I would like to know if ICS is already stable for 64bits development. I`m porting my system to 64bits and I updated to ICS8, but I´m having many issues (ICS is in the core of my system) that looks like memory overflow or overwrite, so, I´m trying to find out the problems and I want to

Re: [twsocket] UPNP

2011-01-11 Thread Eric Fleming Bonilha
with normal router/firewall Port Forwarding, as per many good sites found with Google. So much safer than letting UPnP work. Regards. Dave B. PS: UPnP is not the same as Plug and Play hardware detection, that is a totally different animal. -Original Message- From: Eric Fleming Bonilha

Re: [twsocket] UPNP

2011-01-07 Thread Eric Fleming Bonilha
I thought about that too But I found the problem. The LocalAddr (or addr? don´t remember now) must be changed to local IP address, not 0.0.0.0, or else I don´t receive the responses Thanks! Eric -- From: Markus Humm markus.h...@freenet.de

[twsocket] UPNP Client

2011-01-06 Thread Eric Fleming Bonilha
Hi I´m researching on UPnP communication and I found that it relies on multicast messages sent to address 239.255.255.250 on port 1900 I tried to receive messages from this multicast address using ICS but it does not work. Using other multicast addresses it works just fine, but I simply can´t

Re: [twsocket] ICS Message handlers

2010-08-18 Thread Eric Fleming Bonilha
Hi Anton, I call it directly, in order not to allocate handlers, if you create a class with a handle and post a message to it, it will be the same as using TTimer directly, because you will use as many resources as TTimer would use (1 handle per instance), unless you create a class that is

[twsocket] Suggestion for improvement

2010-08-18 Thread Eric Fleming Bonilha
Hello I would suggest the changing of constant WH_MAX_MSG in OverbyteIcsWndControl.pas to a global variable to which we can change on our software, without changing ICS code. Doing this will allow us to control the amount of shared resources per handle, giving the ability to create more

Re: [twsocket] ICS Wnd Control - Possible bug

2010-08-18 Thread Eric Fleming Bonilha
HI Arno True, I think that will help, I will add this line to my ICS code to check if it works, but I believe that it will work I also think that this is something that must be on ICS code, on UnregisterMessage as you proposed, not custom code. I will test and come back to you soon Eric

Re: [twsocket] ICS Wnd Control - Possible bug

2010-08-18 Thread Eric Fleming Bonilha
Msg := 0; while PeekMessage(LMsg, FHandle, Msg, Msg, PM_REMOVE) do {loop}; // == added if FMsgCnt = 0 then DeallocateHWnd; end; Just a little correction while PeekMessage(LMsg, FHandle, Msg, Msg, PM_REMOVE) do {loop}; // == added Msg := 0; Or else you will pass 0 to

Re: [twsocket] Suggestion for improvement

2010-08-18 Thread Eric Fleming Bonilha
That won't work since TIcsWndHandler declares a static array with length WH_MAX_MSG. Instead I suggest that TIcsWndHandlerPool gets a public, thread-safe method which checks whether the value can be changed and would raise an exception if not. This method would succeed only if the pool was empty

[twsocket] ICS WndControl

2010-08-17 Thread Eric Fleming Bonilha
Hi I´m studying TICSWndControl so I can use it as base class for my app. I´m curious about something, you have the constant WH_MAX_MSG = 100, which means that each Handler created can handle up to 100 different messages, from different objects right? Is there a reason to be 100? If I increase

[twsocket] ICS Wnd Control - Possible bug

2010-08-17 Thread Eric Fleming Bonilha
Hello all While I was trying to use TICSWndControl as base class to share handles for message and consume less OS resources I ran into a very strange problem, that took me some nights of sleep, after a lot of researching I have found a problem in WndControl shared handles implementation, and I

Re: [twsocket] ICS Message handlers

2010-08-13 Thread Eric Fleming Bonilha
Dear Arno, Did you test that in exactly the same environment, same box, both service or GUI applications, both non or RDP sessions etc.. ? I tested on the same box, GUI and service. Non RDP, all local desktop I will provide much more data, I´m preparing a document for you and a sample

Re: [twsocket] ICS Message handlers

2010-08-13 Thread Eric Fleming Bonilha
François Windows limit the number of windows handles to 10.000. That's why ICS V7 is designed to use only one handler for a lot of TWSocket so that you can create a lot of sockets. Which OS are you using which allows creating 1.000.000 handles ? After more testing, and a clear mind of a new

Re: [twsocket] ICS Message handlers

2010-08-13 Thread Eric Fleming Bonilha
I'm still stuck with Delphi 7 at the office, so I don't know if this has changed during the years. However, looking at the source code of TIcsWndControl.AllocateHWnd(), it appears that it's still locking the resource in order to create new handles. My guess is, no. I think that they lock in

Re: [twsocket] ICS Message handlers

2010-08-13 Thread Eric Fleming Bonilha
Hi SubZero, I hope you received my reply to you and got everything ok between us. I have a question for you: I got it, don´t worry, I wasn´t mad, I was just thinking that I was asking something obvious hehe, I thought that it was a silly question, since I don´t have much knowlege on how

Re: [twsocket] ICS Message handlers

2010-08-13 Thread Eric Fleming Bonilha
François Reusing the design I've done is very easy. Just derive your class from TIcsWndControl and override the methods AllocateMsgHandlers, FreeMsgHandlers and MsgHandlersCount to get your own messages. See how it is done in many ICS components. very easy. It is really easy to use and it is

Re: [twsocket] ICS Message handlers

2010-08-13 Thread Eric Fleming Bonilha
TIcsThreadTimer is a good choice for 10,000+ of lazy timers, when accuracy isn't very important. TIcsTimer is a 'normal' timer that requires a TIcsWndControl instance to work. There are demos of both in the MiscDemos directory. What I did was something similar, but not using messages I

Re: [twsocket] OT: ICS-based IQ Proxy Server supports 60K concurrent connections on single port now!

2010-08-13 Thread Eric Fleming Bonilha
SubZero What's new in IQ Proxy Server 3.4.2R - On single port, IQP now supports 60,000 simultaneous connections That is really nice, did you get that by just activating the desktop interaction flag on? Eric -- To unsubscribe or change your settings for TWSocket mailing list please goto

Re: [twsocket] ICS Message handlers

2010-08-13 Thread Eric Fleming Bonilha
One limitation with such kind of implementation (might not be relevant) is that the application blocks until entire list of events is processed. Like iterating over a list of n server clients blocks all clients. Yes, that is true, but I try not to have long processing in timers, just routines

[twsocket] ICS Message handlers

2010-08-12 Thread Eric Fleming Bonilha
Dear ICS Team, I found a problem in our software that is limiting the total ammount of TCP sockets that I can create. The problem that I found is that I can´t create many many instances of TWSocket, because of its internal message handler (I did many tests), here are my findinds: We use

Re: [twsocket] ICS Message handlers

2010-08-12 Thread Eric Fleming Bonilha
It will be interesting to hear an answer to this... Thank you, Why? Is that a silly question? :( I don´t know how ICS works internally, I´m just wondering what is happening ;) Eric -- To unsubscribe or change your settings for TWSocket mailing list please goto

Re: [twsocket] ICS Message handlers

2010-08-12 Thread Eric Fleming Bonilha
François, Windows limit the number of windows handles to 10.000. That's why ICS V7 is designed to use only one handler for a lot of TWSocket so that you can create a lot of sockets. Which OS are you using which allows creating 1.000.000 handles ? Windows 7 64bit with 4GB RAM, and it does

Re: [twsocket] DNS Problem

2010-08-09 Thread Eric Fleming Bonilha
Arno Garrels wrote: So multiple calls to DnsLookup from the same thread context are serialized. In other words, DnsLookup always returns immediately, however Win32 API WSAAsyncGetHostByName serializes multiple requests from the same thread context internally. This may trigger OnDnsLookupDone

Re: [twsocket] DNS Problem

2010-08-09 Thread Eric Fleming Bonilha
Correct, the calling thread won't be blocked. Arno, I´m having a problem with a customer, and I sucessfully reproduced the same problem here. I really believe that it is related to DNS Lookup. Here is what is happening: - I have a communication thread that spawns all TCP client sockets,

Re: [twsocket] DNS Problem

2010-08-09 Thread Eric Fleming Bonilha
Correct, the calling thread won't be blocked. Arno, I have checked the ICS code, and I found this: OverbyteIcsWSocket.pas on line 7290 (TCustomWSocket.Connect) if not FAddrResolved then begin { The next line will trigger an exception in case of failure }

Re: [twsocket] DNS Problem

2010-08-09 Thread Eric Fleming Bonilha
Sorry I misunderstood. I thought you used method DnsLookup. So in this case it is simple to fix, call method DnsLookup and connect with a dotted IP address from the OnDnsLookupDone event handler. Hi Arno Thanks for the clarification So, if I use the method DnsLookup all the requests will be

Re: [twsocket] DNS Problem

2010-08-09 Thread Eric Fleming Bonilha
Yes, it is safe, however I would consider to use WSocket_gethostbyname as well (more work). What is the differenc? I See that wsocket_gethostbyname returns more information, but is there a reason to use it instead of the other method? Thanks Eric -- To unsubscribe or change your

[twsocket] DNS Problem

2010-08-06 Thread Eric Fleming Bonilha
Hello all I believe I have posted the same question some years ago but I can´t remember and find it What could cause the following thing: I have several instances (More than 20) of TWSocket (TCP Client), running all on the same thread (Secondary thread, not main thread). Each instance will

Re: [twsocket] ICS V7 and D2010 mess up with RTTI

2009-11-05 Thread Eric Fleming Bonilha
with the {$RTTI...} flag..., this is sure a bug in the compiler Eric - Original Message - From: Arno Garrels arno.garr...@gmx.de To: ICS support mailing twsocket@elists.org Sent: Thursday, November 05, 2009 4:01 PM Subject: Re: [twsocket] ICS V7 and D2010 mess up with RTTI Eric Fleming Bonilha

[twsocket] ICS V7 and D2010 mess up with RTTI

2009-11-04 Thread Eric Fleming Bonilha
Hi, I had a very strange problem with your library v7 and Delphi 2010. My software relies too much on RTTI for Record data, and (After loosing a whole day trying to find out why it was happening) I found that your library sets NO_EXTENDED_RTTI directive as Default wich sets {$RTTI EXPLICIT

[twsocket] 10K Connections

2009-07-20 Thread Eric Fleming Bonilha
Hi, I would like to know if anyone here has already developed or worked with any project that uses ICS and handles about 10K Incomming TCP Connections simultaneously? I have a project for video streaming where the server must handle about 10k simultaneous TCP connection (Sending live video

Re: [twsocket] 10K Connections

2009-07-20 Thread Eric Fleming Bonilha
Thanks I should have searched it before. I can also split into more servers if it is the case, to make a load balancing environment. I currently use ICS6, I just tested ICS-7 on D2009 but I didn´t port my app to D2009 yet. Will ICS-7 work on D2007? Thanks for the hints Eric -

Re: [twsocket] Silly UDP Question

2008-10-23 Thread Eric Fleming Bonilha
I just worked fine! Thanks a lot Francois! Éric - Original Message - From: Francois PIETTE [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Wednesday, October 22, 2008 2:24 PM Subject: Re: [twsocket] Silly UDP Question But how do I fill the TSockAddr structure to

Re: [twsocket] Silly UDP Question

2008-10-22 Thread Eric Fleming Bonilha
Thanks Francois! But how do I fill the TSockAddr structure to pass to SendTo? Eric - Original Message - From: Francois Piette [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Wednesday, October 22, 2008 4:25 AM Subject: Re: [twsocket] Silly UDP Question I have a