Platforms to show: All Mac Windows Linux Cross-Platform
Back to UDPSocketMBS class.
UDPSocketMBS.AddMembership(MultiAddress as string, InterfaceAddress as string = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 14.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Internally this uses IPPROTO_IP/IP_ADD_MEMBERSHIP option.
Lasterror is set.
MultiAddress: The IPv4 address of the group to join.
InterfaceAddress: The IPv4 address of the network interface to use. Can be empty for any interface.
Some examples using this method:
UDPSocketMBS.Bind(Port as Integer, IP as string = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 14.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If IP is not empty, you can bind the socket to only the given network interface with that IPv4.
Set ReuseAddress to bind to an address which already a socket is bound to.
Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 14.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 14.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Closes the socket.
UDPSocketMBS.DropMembership(MultiAddress as string, InterfaceAddress as string = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 14.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Internally this uses IPPROTO_IP/IP_DROP_MEMBERSHIP option.
Lasterror is set.
MultiAddress: The IPv4 address of the group to join.
InterfaceAddress: The IPv4 address of the network interface to use. Can be empty for any interface.
Some examples using this method:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 18.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Calls events if needed.
This is called automatically via timer by the plugin.
UDPSocketMBS.Read(peek as boolean = false) as DatagramMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 14.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If peek is true, the data is not removed from read buffer.
On error returns nil.
UDPSocketMBS.SendMessage(Data as DatagramMBS) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 14.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please specify with port and address of datagram where package is sent to.
Returns number of bytes sent.
Lasterror is set.
See also:
UDPSocketMBS.SendMessage(Data as MemoryBlock, IP as String, Port as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 14.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please specify with port and IP where package is sent to.
Returns number of bytes sent.
Lasterror is set.
See also:
UDPSocketMBS.SendMessage(Data as string, IP as String, Port as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 14.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please specify with port and IP where package is sent to.
Returns number of bytes sent.
Lasterror is set.
See also:
The items on this page are in the following plugins: MBS Network Plugin.