{"added":null,"apiVersion":1,"behindSince":null,"buildDepends":[],"categories":["net","python"],"comment":"Bind to ephemeral port, force it into TIME_WAIT state, and unbind it","compare":"/compare/py3-ephemeral-port-reserve/index.json","dependentCount":null,"description":"Sometimes you need a networked program to bind to a port that can't\nbe hard-coded. Generally this is when you want to run several of\nthem in parallel; if they all bind to port 8080, only one of them\ncan succeed.\n\nThe usual solution is the \"port 0 trick\". If you bind to port 0,\nyour kernel will find some arbitrary high-numbered port that's\nunused and bind to that. Afterward you can query the actual port\nthat was bound to if you need to use the port number elsewhere.\nHowever, there are cases where the port 0 trick won't work. For\nexample, mysqld takes port 0 to mean \"the port configured in my.cnf\".\nDocker can bind your containers to port 0, but uses its own\nimplementation to find a free port which races and fails in the\nface of parallelism.\n\nephemeral-port-reserve provides an implementation of the port 0\ntrick which is reliable and race-free.","flavors":[{"comment":"Bind to ephemeral port, force it into TIME_WAIT state, and unbind it","pkgName":"py312-ephemeral_port_reserve-1.1.4"},{"comment":"Bind to ephemeral port, force it into TIME_WAIT state, and unbind it","pkgName":"py313-ephemeral_port_reserve-1.1.4"},{"comment":"Bind to ephemeral port, force it into TIME_WAIT state, and unbind it","pkgName":"py314-ephemeral_port_reserve-1.1.4"}],"html":"https://daemonports.org/netbsd/net/py-ephemeral_port_reserve/","kind":"port","lastUpdate":null,"license":["mit"],"maintainer":"pkgsrc-users@NetBSD.org","name":"py311-ephemeral_port_reserve","newest":true,"newestVersion":"1.1.4","noVulnData":false,"origin":"net/py-ephemeral_port_reserve","otherSystems":[{"maintainer":"The OpenBSD ports mailing-list \u003cports@openbsd.org\u003e","newest":true,"noVulnData":true,"origin":"net/py-ephemeral_port_reserve","path":"/openbsd/net/py-ephemeral_port_reserve/","system":"OpenBSD","version":"1.1.4p2"}],"packages":[{"repo":"NetBSD 10.1 x86_64","versions":["1.1.4"]},{"repo":"NetBSD 10.1 aarch64","versions":["1.1.4"]},{"repo":"SmartOS / illumos x86_64","versions":["1.1.4"]},{"repo":"macOS 15 arm64","versions":["1.1.4"]}],"pkgName":"py311-ephemeral_port_reserve-1.1.4","related":null,"repository":"pkgsrc","requiredBy":[],"requiredByCount":0,"runDepends":["lang/python311"],"status":null,"system":"netbsd","systemLabel":"NetBSD","version":"1.1.4","versions":null,"vulnerabilities":null,"www":"https://github.com/Yelp/ephemeral-port-reserve/"}
