mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-24 06:47:59 +01:00
This commit adds a new NextAvailablePortForProcess function that takes a process ID and then assures unique (non-occupied) port numbers are returned per process. This uses a temporary file that contains the latest used port and a secondary temporary lock file to assure only a single goroutine can request a new port at a time. The GenerateProcessUniqueListenerAddresses is intened to be used as a package-level override for the ListenAddressGenerator variable. We don't use it by default to make sure we don't break any existing assumptions. |
||
---|---|---|
.. | ||
rpctest | ||
bip0009_test.go | ||
csv_fork_test.go | ||
getchaintips_test.go | ||
main.go | ||
prune_test.go | ||
README.md | ||
rpcserver_test.go |