netSendUDPMsg

Sends a UDP datagram to the specified IP address and port. Takes a handle (Int), IP address (String), port (Int), buffer pointer (Int), and size (Int). Returns the number of bytes sent, or -1 on error (Int).

Network

Parameters & Returns

Parameters

handle Int
ip String
port Int
buffer Int
size Int

Returns

Int

Quick Summary

Sends a UDP datagram to the specified IP address and port. Takes a handle (Int), IP address (String), port (Int), buffer pointer (Int), and size (Int). Returns the number of bytes sent, or -1 on error (Int).

Technical Exegesis...

Sends 'size' bytes from the buffer as a UDP datagram to the specified IP and port. Returns the number of bytes sent, or -1 on error (SOCKET_ERROR). Returns 0 if any parameter is invalid (NULL ip, NULL buffer, size <= 0, port <= 0, or invalid handle).

Uses sendto with the socket handle. IP should be in dotted notation (e.g., "192.168.1.100"). UDP is unreliable and unordered - datagrams may be lost, duplicated, or arrive out of order. No connection needed.

Example

Example.bam
; No example implemented yet