So, as I understand the approach the TWSocketServer shall be extended
as a wrapper or helper to make the workaround of creating multiple
TWSocketServer instances in code easier. In this case it _might be
better to create a new component that handles this?

I think most server application can be enhanced easily by upgrading ICS to a version with and enhanced TWSocketServer for multilistening. Most server applications (or component) just want to listen on several IP:Port and nothing else changed. The goal is to make that case (Pareto law: 80% are of this type 20% are more complex) as easy as possible. That's why at first glance I tough about the addr property.

Side note: you objected about the addr property because it participate to the component identity. I'm just thinking is is enough to add one more component. The main component would never listen to anything, instead, as much subcomponents would be created as there are IP:Port to listen to. This makes the design more orthogonal. Handling the main component would affect all subcomponent. Handling a subcomponent would affect only that one.

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.

instead in future versions it should be allowed
to add some breaking changes and to fix current design flaw
(my current IPv6 multi-listening hack should be removed from the
IPv6 branche as well for the same reason).

One of the ICS major key success factor has always been the rule "don't break existing code".
I would like to avoid as much as possible breaking changes.
Probably breaking changes could be iontroduced the day ICS stops supporting non unicode compiler. Probably ICS-V8 could be that one, maybe to be released at the same time as Delphi crossplatfom, abandonning support for most of old Delphi version. I'm thinking about letting ICS-V7 live for D7-D2010 and have ICS-V8 for Delphi-XE and the next one.
Just ideas right now.

--
francois.pie...@overbyte.be
http://www.overbyte.be


----- Original Message ----- From: "Arno Garrels" <arno.garr...@gmx.de>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Saturday, November 27, 2010 6:32 PM
Subject: Re: [twsocket] TWSocketServer: how to make it listening toseveralIP:Port?


Francois PIETTE wrote:
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.

So, as I understand the approach the TWSocketServer shall be extended
as a wrapper or helper to make the workaround of creating multiple
TWSocketServer instances in code easier. In this case it _might be
better to create a new component that handles this?
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. This is not possible to achive
with current TWSocketServer design. Introducing new workarounds (hacks)
should be avoided, instead in future versions it should be allowed
to add some breaking changes and to fix current design flaw
(my current IPv6 multi-listening hack should be removed from the
IPv6 branche as well for the same reason).

--
Arno Garrels


--
francois.pie...@overbyte.be
http://www.overbyte.be

----- Original Message -----
From: "Arno Garrels" <arno.garr...@gmx.de>
To: "ICS support mailing" <twsocket@elists.org>
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 <g>. 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

--
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

Reply via email to