Skip to content

Instantly share code, notes, and snippets.

@QZLin
Created January 6, 2022 10:48
Show Gist options
  • Save QZLin/ac0ca464f610df0d3f562b0bcac24965 to your computer and use it in GitHub Desktop.
Save QZLin/ac0ca464f610df0d3f562b0bcac24965 to your computer and use it in GitHub Desktop.
Simple Python Udp Client
from socket import *
addr = ('127.0.0.1', 8000)
s = socket(AF_INET, SOCK_DGRAM)
s.sendto('testmsg'.encode(encoding='utf-8'), addr)
s.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment