import socket


def init_server(addr):
    """
    Init a simple server from address.

    :param addr: (host, port)
    :return: socket
    """
    # server
    # Symbolic name meaning all available interfaces
    # Arbitrary non-privileged port
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.bind(addr)  # (host, port) host ='', port = 50007
    s.listen(1)
    return s