Guest User

Untitled

a guest
May 25th, 2018
92
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.  
  3. # UDP server
  4. sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  5. sock.bind(('0.0.0.0', 5555))
  6. data, addr = sock.recvfrom(4096)
  7.  
  8. # UDP client
  9. sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  10. buffer = b'a' * 1430
  11. sock.sendto(buffer, ('10.0.0.3', 5555))
Add Comment
Please, Sign In to add comment