set-timeout
- Sets timeout for the UDP/TCP socket. Sets timeout for both sending and receiving packets on the socket.
- timeout is an integer with the value in milliseconds
Edit
| Parameter | Type | Required | Description |
|---|---|---|---|
| handle | int | + | Connection handle |
| timeout | int | + | Set timeout value in milliseconds |
Edit
nothing
Edit
local network = require("network")
local handle = network.udp();
local timeout_milliseconds = 20
network.set_timeout(handle, timeout_milliseconds)