asebadummynode can request ephemeral ports
First part of issue #544 (closed): asebadummynode now can ask for an ephemeral port using the --port 0
option. Additionally, the --basePort
option allows one to start numbering anywhere, not just 33333.
% asebadummynode -p 0
tcp:port=59048
% asebadummynode -p 20000 1
tcp:port=20000
% asebadummynode -b 20000 2
tcp:port=20002
% asebadummynode
tcp:port=33333
This PR depends on Dashel >= 1.2.0 in order to correctly print the target with the generated port number; otherwise, it is reported as tcp:port=0
.
Usage: asebadummynode [--basePort|-b BASE, default 33333] [ID, from 0 to 9]
Usage: asebadummynode --port|-p PORT [ID, from 0 to 9]
Usage: asebadummynode --help|-h
Creates one node dummynode-ID with node id ID+1 listening on port:
- BASE+ID, if BASE != 0 and BASE+ID is available
- PORT, if PORT != 0 and PORT is available
- a dynamically chosen port, if PORT or BASE == 0.
The Dashel target is printed on stdout.