# ------------------------------------------------------------
# Copyright © 2026/2027 Dr. Mohammad Alja'afreh. All rights reserved.
# PSUT IoT Engineering Learning Platform
# ------------------------------------------------------------
import socket
 
# ---- UDP socket: no listen(), accept() or connect().
tx = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
 
# Each sendto() = one datagram with its own address.
tx.sendto(b'room-101,24.5', ('127.0.0.1', 7000))
tx.sendto(b'room-102,26.1', ('127.0.0.1', 7000))
