import socket


def setup_socket() -> socket.socket:
    """
    sets up the server socket for clients to connect to.

    :return: the generated socket.
    """
    sock = socket.socket()
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    sock.bind(("", 6090))
    sock.setblocking(False)
    sock.listen()
    return sock