Hello!

>> Now let's assume that application listens on two ip:port pairs, each for
>> different kind of communication. For example, 192.168.1.1:2048 and
>> 192.168.1.1:27015. Also, let's assume that user can define on which 
>> ip:port
>> one of servers should listen (another ip:port pair would be fixed). What
>> happens if user enters "/192.168.1.1:2048/192.168.1.1:27015/" (for 
>> example,
>> because he/she heard/read somewhere that with new ICS this is possible, 
>> and
>> the application is based on ICS)? There would be clear conflict between
>> either:
>> - one of server components that now owns both ports and another that
>> attempts to bind to owned port
>> *or*
>> - the second component that correctly owns 27015 port and first component
>> that attempts to bind "subservers" to both 2048 and 27015 ports
>> (depends on component creation order).

> This is not different than usual. Any application asking for to listen on a
> IP:port has to be ready to be refused because the port is already in use. 
> Having multiple IP:port created by a single component doesn't change 
> anything here. The application would handle it exactly the same way.

Not quite, because application *doesn't know* that it's going to listen on
three (or more) ports (instead of two).

>> While that change doesn't directly break existing code, it might
>> introduce
>> difficult to understand bugs, as seen above.

> I don't agree with you. The design as I suggest make it totally equivalent
> to having multiple independant TWSocketServer component with common event 
> handlers.

As far as I understand your design well, it's not totally equivalent because
it will treat any single bind failure as a total disaster, even if another
binds are meant to be spare and actually not required to function (failure
to bind on other ip:ports is not considered fatal).

-- 
Piotr Dałek
enigmati...@interia.pl

----------------------------------------------------------------
Nie polegaj na drogowcach – sam zaskocz zimę i ZMIEŃ OPONY!
SprawdĹş >> http://linkint.pl/f286e

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