Dup Goto 📝

Trivial UDP Send Example

PT2/lang/python/net/udp python net udp 12-13 18:11:25
To Pop
13 lines, 20 words, 258 chars Wednesday 2023-12-13 18:11:25
#!/usr/bin/env python
import socket
import sys
import os

def send_message(host,port,message):
  with socket.socket(socket.AF_INET,socket.SOCK_DGRAM) as s:
    s.connect((host,port))
    s.send(message)

send_message("mrbobbins",4000,"boing boing")