Good day,
I checked in some code to make unbind_port() to bring it up to date with
bind_port()'s ability to only bind a single IP. This does not affect the
Genesis 1.1 tree.
This fix adds an optional second argument to unbind_port(). If present, it
must be a string, and any ports bound with an IP matching that string will
be unbound. If a port is bound to all IPs, then unbinding it on any port
will unbind it on all ports. Similarly, not passing in a string will unbind
all servers on the specified port.
This maintains the current behavior of dropping any prebound ports. I do
not know of a way to un-listen() a port without also unbinding it. While
there are hackish ways around this, we currently do not allow you to re-bind
a port that you were only able to bind because the server started as root.
The documentation has not been updated. I hesitate to add Genesis 1.2
specific information to the help nodes in ColdCore. I also really need
driver documentation to move out of ColdCore, partially for this reason.
In ColdCore, to use this capability, edit $daemon.stop_listening() and
replace the line:
(| unbind_port(p[1]) |);
with:
(| unbind_port(@p) |);
- Bruce
|