Created
May 25, 2017 01:56
-
-
Save ricklentz/a2bd3e174c760b75e7f555ec16fb3748 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
UDP_IP = "127.0.0.1" | |
UDP_PORT = 24000 | |
my_bytes = bytearray(1) | |
print ("UDP target IP:", UDP_IP) | |
print ("UDP target port:", UDP_PORT) | |
print ("message:", my_bytes) | |
sock = socket.socket(socket.AF_INET, # Internet | |
socket.SOCK_DGRAM) # UDP | |
sock.sendto(my_bytes, (UDP_IP, UDP_PORT)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment