Platforms to show: All Mac Windows Linux Cross-Platform

Back to UDPSocketMBS class.

UDPSocketMBS.AddressFamily as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 18.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The address family of the socket.

This is either RAWSocketMBS.AddressFamilyINet (2) for IPv4 or RAWSocketMBS.AddressFamilyINet6 (Mac 30, Windows 23 and Linux 10) for IPv6.
(Read and Write property)

UDPSocketMBS.AvailableBytes as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns number of bytes available for reading.

Lasterror is set.
(Read only property)

UDPSocketMBS.BindAddress as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The IP used for bind operation.

This is set by Bind on success.
(Read and Write property)

UDPSocketMBS.BindPort as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The port used for bind operation.

This is set by Bind on success.
(Read and Write property)

UDPSocketMBS.Broadcast as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether broadcasts are allowed.

Set to true before sending a broadcast message.
Internally this uses SOL_SOCKET/SO_BROADCAST option.
Lasterror is set.
(Read and Write property)

UDPSocketMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal socket handle.

(Read and Write property)

UDPSocketMBS.Lasterror as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The last error code.

Platform dependent.
(Read and Write property)

UDPSocketMBS.LocalIP as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries local IP.

Can be 0.0.0.0 if unknown.
May only be set if connected or binded.
Lasterror is set.
(Read only property)

UDPSocketMBS.LocalPort as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries local port.

Lasterror is set.
Can be -1 if unknown.
(Read only property)

UDPSocketMBS.MulticastInterface as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The interface to use for multicast.

Internally this uses IPPROTO_IP/IP_MULTICAST_IF option.
Lasterror is set.

Assign empty string to use all interfaces.
May return 0.0.0.0 to indicate all interfaces.
(Read and Write property)

UDPSocketMBS.MulticastLoop as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether multicast packets are also sent to the sending socket.

Internally this uses IPPROTO_IP/IP_MULTICAST_LOOP option.
Lasterror is set.
(Read and Write property)

Some examples using this property:

UDPSocketMBS.MulticastTimeToLive as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The multicast time to live value.

Internally this uses IPPROTO_IP/IP_MULTICAST_TTL option.
Lasterror is set.
Range from 0 to 255.
(Read and Write property)

UDPSocketMBS.Protocol as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The socket protocol.

Is ProtocolUDP (17) for UDP sockets.
(Read and Write property)

UDPSocketMBS.ReceiveBufferSize as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries the receiving buffer size.

The buffer size may be increased for high-volume connections, or may be decreased to limit the possible backlog of incoming data. The system places an absolute limit on these values.
Internally this uses SOL_SOCKET/SO_RCVBUF option.
Lasterror is set.
(Read and Write property)

UDPSocketMBS.ReuseAddress as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Allows reuse of same port.

Internally this uses SOL_SOCKET/SO_REUSEADDR option.

see also
http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t

Lasterror is set.
(Read and Write property)

UDPSocketMBS.ReusePort as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Allow reuse of same port and IP.

Internally this uses SOL_SOCKET/SO_REUSEPORT option.
On Windows, this is not supported, so this property sets ReuseAddress.
Lasterror is set.
(Read and Write property)

UDPSocketMBS.SendBufferSize as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The sending buffer size.

The buffer size may be increased for high-volume connections, or may be decreased to limit the possible backlog of incoming data. The system places an absolute limit on these values.
Internally this uses SOL_SOCKET/SO_SNDBUF option.
Lasterror is set.
(Read and Write property)

UDPSocketMBS.SocketError as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The native socket error.

Internally this uses SOL_SOCKET/SO_ERROR option.
Lasterror is set.
(Read only property)

UDPSocketMBS.SocketType as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The socket type.

Is SocketTypeDatagram (2) for UDP sockets.
(Read and Write property)

UDPSocketMBS.TimeToLive as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The time to live value.

Internally this uses IPPROTO_IP/IP_TTL option.
Lasterror is set.
Range from 0 to 255.
(Read and Write property)

Some examples using this property:

UDPSocketMBS.Type as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Socket type.

Always 2 as this is a datagram socket.
Internally this uses SOL_SOCKET/SO_TYPE option.
Lasterror is set.
(Read only property)

UDPSocketMBS.TypeOfService as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Network MBS Network Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The type of service value.

Works only on BSD Sockets.

Possible values:
IPTOS_MINCOST = 2
IPTOS_RELIABILITY = 4
IPTOS_THROUGHPUT = 8
IPTOS_LOWDELAY = 16

Internally this uses IPPROTO_IP/IP_TOS option.
(May not work on Windows.

Lasterror is set.
(Read and Write property)

The items on this page are in the following plugins: MBS Network Plugin.


The biggest plugin in space...