Guest User

Untitled

a guest
May 28th, 2018
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. import socket
  2.  
  3. PORT = 9090
  4. buf = 1024
  5. s= socket.socket(socket.AF_INET,socket.SOCK_STREAM)
  6. s.connect(('127.0.0.1',PORT))
  7.  
  8. s.send('im a handsome guy'.encode())
  9. s.shutdown(socket.SHUT_WR)
  10.  
  11. data = s.recv(buf)
  12. print(data)
  13. s.close()
Advertisement
Add Comment
Please, Sign In to add comment