Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket, threading, time, asyncio
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- sock.bind(("192.168.50.49", 7777))
- sock.listen(5)
- print("waiting for connectinos ...")
- cli, addr = sock.accept()
- print(addr)
- while 1:
- valv = input(">")
- data = valv.split(" ")
- if data[0] == "recv":
- print(cli.recv(1024).decode())
- cli.send("1".encode())
- continue
- cli.send(valv.encode())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement