Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- sock = socket.socket()
- sock.connect(('10.8.128.183',9990))
- sock.send(b'hello, world!')
- while True:
- data = sock.recv(1024)
- if not data:
- break
- elif data == b"end":
- break
- print(b"from server")
- print(data)
- print()
- message = bytes(input(), 'utf-8')
- sock.send(message)
- sock.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement