accept() Accept a connection. The socket must be bound to an address and listening for connections. The return value can be
socket.send(bytes[, flags]) Send data to the socket. The socket must be connected to a remote socket. The optional flags
ssl.RAND_add(bytes, entropy) Mix the given bytes into the SSL pseudo-random number generator. The parameter entropy
handle_close() Called when the socket is closed.
socket.htonl(x) Convert 32-bit positive integers from host to network byte order. On machines where the host byte order is the
SSLContext.load_dh_params(dhfile) Load the key generation parameters for Diffie-Helman (DH) key exchange. Using DH key exchange
socket.gethostbyname(hostname) Translate a host name to IPv4 address format. The IPv4 address is returned as a string, such
socket.create_connection(address[, timeout[, source_address]]) Connect to a TCP service listening on the Internet address
socket.close() Mark the socket closed. The underlying system resource (e.g. a file descriptor) is also closed when all file
socket.getnameinfo(sockaddr, flags) Translate a socket address sockaddr into a 2-tuple (host, port). Depending
Page 10 of 22