This read-only property specifies the port to which the socket was actually bound.
property MessengerPortBound : word;
public int MessengerPortBound;
Public Property MessengerPortBound As Integer
public int getMessengerPortBound();
unsigned short __stdcall MCUDPTransportGetMessengerPortBound(HMCUDPTransport h);
Specifies the port to which the socket was actually bound. Use this property to get the actual port value, to which the socket was bound, in case when MessengerPort property was set to 0.
Note that due to asynchronous nature of the operation, the port is bound not when you set Active property of the transport to true, but a bit later. So you need to check the value of this property in a loop until it returns a non-zero value.