Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # activeActor.py (client)
- import socket
- import sys
- class API:
- def __init__(self):
- pass
- def addData(self,payLoad):
- with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
- s.connect(("localhost", 118))
- s.sendall(b'0'+str.encode(payLoad))
- s.recv(1024)
- server = API()
- while(True):
- pl = input()
- if( pl == "bonkers"):
- break
- else:
- server.addData(pl)
- server.socket.close()
Add Comment
Please, Sign In to add comment