pex.proto.tcp.tools
¶
Module Contents¶
- class pex.proto.tcp.tools.TCPTools¶
Bases:
object
Subclass of pex.proto.tcp module.
This subclass of pex.proto.tcp module is intended for providing some TCP tools.
- static get_local_host() str ¶
Get local host.
- Return str:
local host
- convert_to_local(host: str) str ¶
Convert host to local / Parse local host.
- Parameters:
host (str) – host to convert / parse
- Return str:
local host
- static check_tcp_port(host: str, port: int, timeout: int = 1) bool ¶
Check if TCP port is opened.
- Parameters:
host (str) – host to check
port (int) – port to check
timeout (int) – check timeout
- Return bool:
True if opened else False