import socket
import threading


def sendMsg(name, s):
    while True:
        s.send(input().encode())


serverAddress = '192.168.0.14'
port = 5000

s = socket.socket()
s.connect((serverAddress, port))

clientThread = threading.Thread(target=sendMsg, args=('threadName', s))
clientThread.daemon = True
clientThread.start()


while True:
    message = s.recv(1024)
    message = str(message, 'utf-8')
    print(message)



s.close
