SHARE
TWEET

Untitled

a guest Jun 28th, 2018 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. serversocket = socket.socket()
  2. serversocket.bind((HOST, PORT))
  3.  
  4. # Specify to only listen to one device
  5. serversocket.listen(0)
  6. print("Socket now listening at port " + str(serversocket.getsockname()[1]))
  7. # Get and display input
  8. print("n")
  9. while True:
  10.     # Find client socket
  11.  
  12.     connection, address = serversocket.accept()
  13.  
  14.     receivedstring = connection.recv(10).decode('utf-8')[2:]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top