Пример #1
0
def send_data():
    while True:
        from Visual import can_send
        if can_send == True:
            from Visual import textvar
            s.sendall(textvar)
            Visual.print_data(textvar)
            time.sleep(2)
Пример #2
0
def check_for_data():
    while True:
        data = s.recv(1024)
        if data:
            Visual.print_data(data)
        else:
            Visual.print_data("Connection Terminated by Server")
            s.close()
            break