Skip to content

Instantly share code, notes, and snippets.

@ati
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save ati/83e38cbc8219dba00088 to your computer and use it in GitHub Desktop.

Select an option

Save ati/83e38cbc8219dba00088 to your computer and use it in GitHub Desktop.
import socket
UDP_IP = "127.0.0.1"
UDP_PORT = 5005
MESSAGE = "Hello, World!"
sock = socket.socket(socket.AF_INET, # Internet
socket.SOCK_DGRAM) # UDP
sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment