Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. import socket
  2. import json
  3.  
  4. client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  5. client.connect(('127.0.0.1', 9999))
  6. res={"user_name":"David","password":"12345"}
  7.  
  8. to_send = json.dumps(res)
  9.  
  10. client.sendall(to_send)
  11. response = client.recv(4096)
  12. print (response)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement