LocalHost (UdpSocket property)

From m204wiki
Jump to navigation Jump to search

Local IP address for bound socket (UdpSocket class)

[Introduced in Sirius Mods 8.0]


Syntax

%ipAddress = udpSocket:LocalHost

Syntax terms

%ipAddress A string to contain the returned IP address of the host to which udpSocket is bound. %ipAddress might contain an IP address specified in either:
  • IPV4 standard 32-bit "dotted-decimal" form: for example, 198.242.244.97.
  • IPV6 standard (RFC 5952) 128-bit form: for example, 2011:0ab4:15a1::4a0e:0280:5274

    The IPV6 form is supported as of version 7.7 of Model 204.

The address format is IPV4 unless the TCPTYPE parameter is explicitly set to an IPV6 value.

udpSocket A UdpSocket object.

Usage notes

  • If a local host was defined for a UdpSocket object (by a BINDADDR specification on the CLSOCKU port used for the UdpSocket, or by a LocalHost parameter setting on the New method that created the UdpSocket object), the socket only receives messages that are sent to that local host IP address.

Examples

For UdpSocket examples of interest, see the Examples section of the UdpSocket New method.

See also