SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 118 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import socket
  2.  
  3. ADDRESS = '127.0.0.1'
  4. PORT = 7777
  5.  
  6. with socket.socket() as s:
  7.     s.bind((ADDRESS, PORT))
  8.     s.listen(1)
  9.     connectionObject, address = s.accept()
  10.     connectionObject.sendall(b'Hello, World!')
  11.     while True:
  12.         with connectionObject:
  13.             data = connectionObject.recv(1024)
  14.             print(data)
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
 
Top