Re: [twsocket] TWSocketServer: how tomakeitlisteningtoseveralIP:Port?
Francois PIETTE wrote: In my option a real ICS multi-listening server should handle all client objects in one list. These client objects should be aware of what listening socket accepted them. That is a good idea. This is not possible to achive with current TWSocketServer design. I wouldn't be so sure. In the meanwhile I think I got the idea. A new very small class TWServerSocket that is instantiated and registered by the TWSocketServer for each new listening socket. TWServerSocket.Listen calls WSAASyncSelect with TWSocketServer's window handle. Small change, not a small new class but a TWSocketServer and currently I override WMASyncSelect and Accept, works like a charm. The MultiListenSockets are a TCollection descendant so accessible in OI as well. The only limit is that they (the additional listening sockets) must run in the same thread context as their owner TWSocketServer. If that wasn't the case an assertion is raised. The idea of a small class is a good idea altough it defenitely force al events to be shared between all listening sockets. That's not a problem imo but you raised the issue previously. Back to the keyboard then. I think a found a way everybody can live with. Will commit this new attempt to the IPv6 branch when I think it's alpha-ready. Then we are able to continue the discussion based on an existing implementation. -- 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
[twsocket] Using FTPClient in dll
Hi! I have to write a dll which downloads some file. I created a project using example OverbyteIcsDll2.dpr as a sample. There are 2 differences. I must put a form inside the dll, which is just a user interface to set up and save connection parameters, but this form is not created at the time of transfer. So NOFORMS is not defined. The other difference is that I create a datamodule in the thread, and ftpcli is created inside that module. I use async methods. It is started from a method of datamodule: FTPCli.OpenAsync; FTPCli.MessageLoop; The transfer is working fine. The problem is, when OnSessionClosed is fired, PostMessage sends WM_QUIT to FTPCli.Handle* but MessageLoop does not exit. * Also tried FtpCli.ControlSocket.Handle and FtpCli.WndHandler.Handle What am I missing? Thank in advance. Peter A(z) kimenő üzenetben nem található vírus. Ellenőrizte: AVG - www.avg.com Verzió: 9.0.872 / Vírus adatbázis: 271.1.1/3287 - Kiadás dátuma: 11/29/10 08:34:00 -- 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