sendto()
- Sends a datagram to the specified IP address and port number.
Edit
| Parameter | Type | Required | Description |
|---|---|---|---|
| handle | int | + | Connection handle |
| datagram | string | + | Datagram contents |
| address | string | + | IP address of the recipient |
| port | string | + | Port at the recipient |
Edit
Nothing
Edit
local network = require("network")
local handle = network.udp();
network.sendto(handle, "Hi there!", "192.168.1.100", "8021")