|  Developer
Updated on November 14, 2021

send()

  • Sends a datagram to the UDP peer of a connected socket.
Edit
Parameter Type Required Description
handle int + Connection handle
datagram string + Datagram contents
Edit
Nothing
Edit
				
					local network = require("network")
local handle = network.udp();
network.setpeername(handle, "192.168.1.100", "8021")
network.sendto(handle, "Hi there!")
network.sendto(handle, "What's up!")