def sender():
msg = input("> ")
if msg:
connection.send(msg.encode('utf-8'))
def getter():
try:
data = connection.recv(2048).decode('utf-8')
if data:
print(data)
except ConnectionResetError:
print("[*] connection reseted")
sys.exit()