ClaimedPort(port, sockets, guards)
¶
A port claimed on every address that localhost can mean on this machine.
Closing the claimed port, directly or by leaving its context, closes its sockets and the sockets that hold the port's wildcard addresses, and releases the port.
Create claimed ports only via claim_port, not by
instantiating this class directly.
Create a claimed port.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
port
|
int
|
Port that's claimed. |
required |
sockets
|
list[socket]
|
Bound sockets, one for each loopback address. |
required |
guards
|
list[socket]
|
Bound sockets that hold the port's wildcard addresses. |
required |