def METHOD_NAME(cls, port):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
    try:
        sock.bind(("127.0.0.1", port))
    except socket.error as e:
        print("Error binding in the Carbon responder: %s" % str(e))
        sys.exit(1)
    sock.listen(100)
    while True:
        (conn, _) = sock.accept()
        conn.settimeout(2.0)
        lines = b''
        while True:
            data = conn.recv(4096)
            if not data:
                break
            lines += data
        if port == cls._carbonServer1Port:
            cls._carbonQueue1.put(lines, True, timeout=2.0)
        else:
            cls._carbonQueue2.put(lines, True, timeout=2.0)
        if threading.currentThread().name in cls._carbonCounters:
            cls._carbonCounters[threading.currentThread().name] += 1
        else:
            cls._carbonCounters[threading.currentThread().name] = 1
        conn.close()
    sock.close()