netUDPMsgPort

Returns the port number of the sender of the last received UDP datagram. Takes a handle (Int). Returns the sender's port number (Int).

Network

Parameters & Returns

Parameters

handle Int

Returns

Int

Quick Summary

Returns the port number of the sender of the last received UDP datagram. Takes a handle (Int). Returns the sender's port number (Int).

Technical Exegesis...

Returns the port number of the sender from the most recent successful netRecvUDPMsg call. The value is stored globally and updated each time netRecvUDPMsg successfully receives a datagram.

The handle parameter is present for API consistency but is not used. The returned port corresponds to the last datagram received on any UDP socket. Useful for implementing reply functionality or sender tracking. Call immediately after netRecvUDPMsg to get the correct sender port.

Example

Example.bam
; No example implemented yet