swot_simulator.logbook.LogRecordSocketReceiver.bind#
- LogRecordSocketReceiver.bind(port: int, address: Optional[str] = None, family: AddressFamily = AddressFamily.AF_UNSPEC, backlog: int = 128, reuse_port: bool = False) None #
Binds this server to the given port on the given address.
To start the server, call start. If you want to run this server in a single process, you can call listen as a shortcut to the sequence of bind and start calls.
Address may be either an IP address or hostname. If it’s a hostname, the server will listen on all IP addresses associated with the name. Address may be an empty string or None to listen on all available interfaces. Family may be set to either socket.AF_INET or socket.AF_INET6 to restrict to IPv4 or IPv6 addresses, otherwise both will be used if available.
The
backlog
argument has the same meaning as for socket.listen <socket.socket.listen>. Thereuse_port
argument has the same meaning as for .bind_sockets.This method may be called multiple times prior to start to listen on multiple ports or interfaces.
Changed in version 4.4: Added the
reuse_port
argument.