def handle_input_connection(connection, client_address, input_queue):
    """
    For each client, there is a thread that waits for incoming plots over the network. If a plot came in, this plot is then put into the main queue from which the server takes
    plots away.
    :param connection:
    :param client_address:
    :param input_queue:
    :return:
    """
    while True:
        recv_message = recv_size(connection)
        input_queue.put(ClientMessage(recv_message, client_address))
        # input_queue.put({"plot":recv_message,"client":client_address}, block=False)
    connection.close()
Beispiel #2
0
def handle_input_connection(connection, client_address, input_queue):
    """
    For each client, there is a thread that waits for incoming plots over the network. If a plot came in, this plot is then put into the main queue from which the server takes
    plots away.
    :param connection:
    :param client_address:
    :param input_queue:
    :return:
    """
    while True:
        recv_message = recv_size(connection)
        if not input_queue: break
        input_queue.put(ClientMessage(recv_message, client_address))
    connection.close()
Beispiel #3
0
def collect_from_server(queue, sock):
    while True:
        recv_message = recv_size(sock)
        queue.put(recv_message)
    sock.close()
Beispiel #4
0
def collect_from_server(queue, sock):
    while True:
        recv_message = recv_size(sock)
        queue.put(recv_message)
    sock.close()