21covid21

Untitled

Feb 4th, 2023
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. import socket as s
  2.  
  3. HOST = 'localhost'
  4. PORT = 33000
  5. BUFFER = 1024
  6. server_socket = s.socket(s.AF_INET, s.SOCK_STREAM )
  7. server_socket.bind((HOST, PORT))
  8. server_socket.listen(3)
  9. client_socket, address = server_socket.accept()
  10.  
  11. sp1=(f"abcde")
  12. sp2=(f"xxxxxx")
  13. client_socket.send(sp1).encode('utf-8')
  14. client_socket.send(sp2).encode('utf-8')
Advertisement
Add Comment
Please, Sign In to add comment