Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket, time
- s = socket.socket()
- host = '127.0.0.1' # needs to be in quote
- port = 1247
- s.connect((host, port))
- print (s.recv(1024).decode)
- a=1
- while True:
- a=a+2
- b=str(a)
- s.send(b.encode())
- #inpt = input('type anything and click enter... ')
- #s.send(inpt.encode())
- print ("the message has been sent")
- time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement