import socket
LQUEUE_SIZE = 500
BUFFER_SIZE = 4096

def server_socket(port):
    """Return a listening socket bound to the given interface and port.
    """
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    sock.bind(("localhost", port))
    sock.listen(LQUEUE_SIZE)
    return sock


def client_socket(addr, port):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setblocking(0)
    sock.connect_ex((addr, port))
    return sock    

ae702fde84fe659228e5eb3c989857b526f5acde
<mask token>


def server_socket(port):
    """Return a listening socket bound to the given interface and port.
    """
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    sock.bind(('localhost', port))
    sock.listen(LQUEUE_SIZE)
    return sock


<mask token>

<mask token>


def server_socket(port):
    """Return a listening socket bound to the given interface and port.
    """
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    sock.bind(('localhost', port))
    sock.listen(LQUEUE_SIZE)
    return sock


def client_socket(addr, port):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setblocking(0)
    sock.connect_ex((addr, port))
    return sock

<mask token>
LQUEUE_SIZE = 500
BUFFER_SIZE = 4096


def server_socket(port):
    """Return a listening socket bound to the given interface and port.
    """
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    sock.bind(('localhost', port))
    sock.listen(LQUEUE_SIZE)
    return sock


def client_socket(addr, port):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setblocking(0)
    sock.connect_ex((addr, port))
    return sock

import socket
LQUEUE_SIZE = 500
BUFFER_SIZE = 4096


def server_socket(port):
    """Return a listening socket bound to the given interface and port.
    """
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    sock.bind(('localhost', port))
    sock.listen(LQUEUE_SIZE)
    return sock


def client_socket(addr, port):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setblocking(0)
    sock.connect_ex((addr, port))
    return sock

import socket
LQUEUE_SIZE = 500
BUFFER_SIZE = 4096

def server_socket(port):
    """Return a listening socket bound to the given interface and port.
    """
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    sock.bind(("localhost", port))
    sock.listen(LQUEUE_SIZE)
    return sock


def client_socket(addr, port):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setblocking(0)
    sock.connect_ex((addr, port))
    return sock    
