GLBasic User Manual

Main sections

SOCK_UDPOPEN

sock% = SOCK_UDPOPEN(port%)


This command creates a socket that enables the sending and receiving of messages via the local UDP port port%.
The return value is either a valid socket or -1 if an error occurred.
You can get any error messages with NETGETLASTERROR$().
The UDP sockets in GLBasic always have the internal parameter SO_BROADCAST enabled, thus you may send broadcast messages with them.

You can retrieve any error messages with NETGETLASTERROR$().

See also...