def create_srv_socket(address):
 listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
 listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
 listener.bind(address)
 listener.listen(64)
 print 'Listening at {}'.format(address)
 return listener

def create_srv_socket ( address ) : listener = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) listener . setsockopt ( socket . SOL_SOCKET , socket . SO_REUSEADDR , 1 ) listener . bind ( address ) listener . listen ( 64 ) print 'Listening at {}' . format ( address ) return listener
build and return a listening server socket .