returned as byte stringwhere it' up to the caller to decode its contents using the struct module or other means the following tables list the socket options defined by python most of these options are considered part of the advanced sockets api and control low-level details of the network you will need to consult other documentation to find more detailed descriptions when type names are listed in the value columnthat name is same as the standard data structure associated with the value and used in the standard socket programming interface not all options are available on all machines the following are commonly used option names for level sol_socketoption name value so_acceptconn determines whether or not the socket is accepting connections allows sending of broadcast datagrams determines whether or not debugging information is being recorded bypasses routing table lookups int gets error status , prevents other sockets from being forcibly bound to the same address and port this disables the so_reuseaddr option periodically probes the other end of the connection and terminates if it' half-open linger lingers on close(if the send buffer contains data linger is packed binary string containing two -bit integers (onoffseconds places out-of-band data into the input queue int size of receive buffer (in bytesint number of bytes read before select(returns the socket as readable timeval timeout on receive calls in seconds timeval is packed binary string containing two -bit unsigned integers (secondsmicroseconds allows local address reuse allows multiple processes to bind to the same address as long as this socket option is set in all processes int size of send buffer (in bytesint number of bytes available in send buffer before select(returns the socket as writable timeval timeout on send calls in seconds see so_rcvtimeo for description of timeval int gets socket type routing socket gets copy of what it sends so_broadcast so_debug so_dontroute so_error so_exclusiveaddruse so_keepalive so_linger so_oobinline so_rcvbuf so_rcvlowat so_rcvtimeo so_reuseaddr so_reuseport so_sndbuf so_sndlowat so_sndtimeo so_type so_useloopback description lib fl ff