Opened 9 years ago
Last modified 9 years ago
#252 closed task
deprecate tub.listenOn("tcp:0") — at Version 1
Reported by: | Brian Warner | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.12.0 |
Component: | network | Version: | 0.9.1 |
Keywords: | Cc: |
Description (last modified by )
We're moving towards less auto-magic allocation/detection and more pre-allocated ports and user-supplied hostnames/IP-addresses. The practice of automatically detecting locally-attached interfaces only works when the other machine you're talking to is on the same network (and with NAT, this is usually not true). And the automatic detection makes things less predictable.
So the plan is to deprecate the following:
Listener.getPortnum()
tub.setLocationAutomatically()
tub.listenOn("tcp:0")
. Or rather, you could still do that, but without.getPortnum()
there's no way to find out the port that got allocated. So you should always choose the port number first.- #137 is WONTFIXed, which would have added
Tub.listenOn(portfile=)
- #138 is WONTFIXed, which would have added
d=Tub.whenReady()
, which should no longer be necessary when we stop waiting for ports to be allocated
And we're adding foolscap.util.allocate_tcp_port()
(which doesn't block) to help applications perform the allocation ahead of time.
Note: See
TracTickets for help on using
tickets.