May 12, 2025
setblocking(), timeouts via settimeout().socket.AF_INET, socket.AF_INET6.socket.SOCK_STREAM, socket.SOCK_DGRAM.SO_REUSEADDR for socket options.socket.socket(): Creates a new socket with specified family, type, and protocol.socket.socketpair(): Builds a pair of connected socket objects.socket.create_connection(): Connects to a TCP service.socket.create_server(): Creates a TCP socket server.socket.fromfd() and socket.fromshare(): Create sockets from file descriptors or shared data.socket.getaddrinfo(): Translates address info.socket.gethostname(), socket.gethostbyname(): Resolves hostnames.socket.inet_pton() and socket.inet_ntop(): IP address conversions.socket.send() and socket.recv(): Sending and receiving data.accept(), bind(), close(), connect(), listen(), recv(), send().family, type, proto.socket(), bind(), listen(), accept().socket(), connect().SO_REUSEADDR to manage socket reuse in TIME_WAIT state.