Returns whether the DLL is loaded and good to use.
The extension can be found on GitHub.
Quick display controls: Categories · Sections · Everything ·
General:
Returns a WSAGetLastError code from the last failed operation (list).
Management:
Creates and returns a new UDP socket.
Returns undefined
if this somehow fails.
Destroys a previously created UDP socket.
Binding:
Binds a socket to the specified port (otherwise the system picks a random one).
Returns whether successful (fails if port is taken, for example).
Datagrams:
Tries to send a datagram to the specified address.
url
can only be an IPv4 (like "127.0.0.1"
).
No resolution will be performed so "localhost"
or a domain will not work.
size
argument can be omitted to use buffer_tell(buffer)
.
Returns the number of bytes that were sent (possibly less than you asked),
or -1
if sending failed.
Tries to retrieve the next datagram from a socket to the specified buffer.
Returns the number of bytes retrieved,
-1
if there's an error,
and -2
if there are no more datagrams in the queue.
Note that trying to receive datagrams on a socket that was neither bound nor used to send anything yields error 10022 (as it has no port associated).
Returns the sender IP address for the last received datagram.
Returns the sender port for the last received datagram.