Re: [twsocket] TWSocketServer: how to make it listening to several IP:Port?
A string property is very easy for the component user at runtime. A single line of code allows to setup all the subcomponents. And this ease saving/loading the configuration for the application. As I said before creating/destroying objects on the fly depending on what the user types in a string property sounds bad in my ears. Properties assigned thru the OI are not set for each character typed by the user, but at the end of the input. The setter is called once. Having a component reactying to user input thru the OI is what's makes Delphi being what it is. I don't see any problem creating/destroying objects during this process. We are at design time and the component will almost do nothing. -- francois.pie...@overbyte.be http://www.overbyte.be - Original Message - From: "Arno Garrels" To: "ICS support mailing" Sent: Saturday, November 27, 2010 4:58 PM Subject: Re: [twsocket] TWSocketServer: howtomakeitlisteningtoseveralIP:Port? Francois PIETTE wrote: There is, for instance, property SslEnable in TWSocketServer descendant TSslWSocketServer that is propagated to clients. Let's say you want two listeners /192.168.1.1:80/192.168.1.1:443 one SSL and one plain text. Then you have to set SslEnable property at run time. Maybe not. Look at TStatusBar, you can add panels and set properties for each of them individually. This is the kind of thing we need. Sure it is possible with TCollection and TCollectionItem. Now we come closer and closer to my first multi-listen server I wrote 2 years ago . with TCollection however a new string property "MultiListenAddrPort" was superfluous as well since all properties can the be set with OI or at run time. I also wonder when the instances specified by property "MultiListenAddrPort" will be created? To be able to have the behaviour I described above, the instances must be created/destroyed on the fly when MultiListenAddrPort is assigned a value. We should do just a the panels in TStatusBar: have a design time user interface (property editor for MultiListenAddrPort) allowing the user to create each instance and assign individual addr and port values. As I said before creating/destroying objects on the fly depending on what the user types in a string property sounds bad in my ears. I think you should give that a trial yourself, I cannot see what you want to achieve exactly. Would your design have a single client list or is it required to iterate over multiple different client lists? -- 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] TWSocketServer: how to make it listening to several IP:Port ?
> Otherwise forcing IIS to allocate even only one IP is impossible. It is quite possible, my public server uses IIS/7 and an ICS web application on different IPs. There are NETSH HTTP IPLISTEN commands that force IIS to listen only on specific IPs, or just change some registry settings. My applications have arrays of server components to support multiple IPs and ports, all using the same events, but all created in code. Building multiple listens into the component is really only beneficial for those that prefer to drop one component on a form. 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] TWSocketServer: how to make it listening to several IP:Port ?
On Fri, Nov 26, 2010 at 4:28 PM, Angus Robertson - Magenta Systems Ltd < an...@magsys.co.uk> wrote: > > I do not see any need for multiple listening except 0.0.0.0 and ::0 > > as I have seen none of the servers doing it. > > No commercial server listens on 0.0.0.0 since commercial servers all have > multiple IP addresses with multiple users and multiple applications, with > the exception of IIS that hogs all addresses even if they are not used, > unless you tell it otherwise. > > In IIS 7.5, there is the option of selecting "All Unassigned". We have the 0.0.0.0 IPv4 equivalent of it in ICS but that does not cover IPv6 ::0. What I said is if we can provide a mechanism to cover "really all" unassigned, the rest could be managed with multiple server components. However if you want to have your own server listen an IP on the same port, you must set it a higher boot priority group. Otherwise forcing IIS to allocate even only one IP is impossible. SZ -- 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] TWSocketServer: how to make it listening to several IP:Port ?
> I do not see any need for multiple listening except 0.0.0.0 and ::0 > as I have seen none of the servers doing it. No commercial server listens on 0.0.0.0 since commercial servers all have multiple IP addresses with multiple users and multiple applications, with the exception of IIS that hogs all addresses even if they are not used, unless you tell it otherwise. I have no problem with Francois's suggestion for a seemless user interface, but await Arno's comments since he has implemented various multilisten servers before and is aware of the internal issues. 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] TWSocketServer: how to make it listening to several IP:Port ?
Hello Francois, Of course it will be a cool design but I do not see any need for multiple listening except 0.0.0.0 and ::0 as I have seen none of the servers doing it. Regards, SZ On Fri, Nov 26, 2010 at 11:12 AM, Francois PIETTE wrote: > Hello all, > > Since the Addr property is a string, the component could easily handle any > special format in that field to support multiple listening IP:Port > (Interface to listen to and port to use on that interface). I think > something like "/192.168.1.1:80/0.0.0.0:81/". IPv4 or IPv6 could be used. > The component can easily find out that there is a multiple IP:Port because > of the "/" at the beginning. The port property would be used as default > value when no prot is specified in the Addr for a given IP. As an example: > Addr := "/192.168.1.1/192.168.2.1/10.1.2.3:80/" and Port := "81" would > make listening on port 81 for 192.168.1.1 and 192.168.2.1, and listening on > port 80 for interface 10.1.2.3. > > The working would be this: > The main TWSocketServer component listen on the first IP:Port specifyed and > create secondary TWSocketServer instances to listen to the other IP:Port. > The main instance keep track of the secondary instances. A new r/o property > "MultiListenList" (and btw "MultiListenListCount") would gives the list of > all TWSocketServer, in the order specified in the Addr property. All > TWSocketServer share the same list. Each get a new property > "MultiListenIndex" which is their index in that list. All event handlers are > common to all TWSocketServer instances. MultiListenIndex would be "-1", > MultiListenList would be nil and MultiListenCount would be 0 if > TWSocketServer is used alone. > > If needed, but not sure it is, new methods could be added to handle all > TWSocketServers at once: MultiListenListen, MultiListenClose and so on. > > This design would not break any existing code and would ease using the new > multiple listen easy to implement in higher level components. > > What do you think ? > > -- > 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