Discuss this help topic in MsgConnect Forum

Filter: C++  Pascal  C#  VB.NET  Java  Java ME  ActiveX  DLL 



UDPTransport.JoinMulticastGroup

UDPTransport     See also    


Enables use of multicast delivery on given address.

Declaration

[C++]
    public JoinMulticastGroup( char* GroupAddress, char* BindAddress, long TTL, bool Loop );

[Pascal]
    constructor JoinMulticastGroup( GroupAddress : string; BindAddress : string; TTL : integer; Loop: boolean );

[VB6]
    Sub IMCXUDPTransport2.JoinMulticastGroup(GroupAddress As String, BindAddress As String, TTL As Long, Loop As Boolean)

[ActiveX]
    void IMCUDPTransport2.JoinMulticastGroup( [in] BSTR GroupAddress, [in] BSTR BindAddress, [in] long TTL, [in] VARIANT_BOOL Loop );

[C#]
    public void JoinMulticastGroup( string GroupAddress, string BindAddress, int TTL, bool Loop );

[VB.NET]
    Public Sub JoinMulticastGroup(ByVal GroupAddress As String, ByVal BindAddress As String, ByVal TTL As Byte, ByVal [Loop] As Boolean)

[Java]
    public void JoinMulticastGroup( String GroupAddress, String BindAddress, int TTL, boolean Loop );

[Java ME]
    not implemented;

[DLL]
    void __stdcall MCUDPTransportJoinMulticastGroup( HMCUDPTransport h, char* GroupAddress, char* BindAddress, long TTL, bool Loop );

Parameters

  • [DLL]h - handle to UDPTransport object that was returned by Create method

  • GroupAddress - Multicast address of the group
  • BindAddress - Interface to bind the address to
  • TTL - The number of "hops" to pass for multicast message
  • Loop - Defines if the message is sent to the socket which sent the original message

Description

    Use this method to add a multicast socket to the group. Adding to the group is necessary to send or receive messages using multicast address.
    GroupAddress specifies the multicast address (in range 224.0.0.1-239.255.255.255) to which the messages are sent or from which the messages are received.
    BindAddress defines the interface to bind to. This one can be empty, in which case the socket is bound to default interface. Note that binding to default interface doesn't mean "any" interface (as it is with binding regular sockets).
    TTL defines the number of gateawys to send the message to. This value is platform-specific, please consult the manual for more details.
    Loop defines if the message sent to the multicast address is received by the sender socket.

    Note, that if the transport is active, this method restarts the transport so that sockets are initialized with participation in multicast group.

See also:     LeaveMulticastGroup    

Discuss this help topic in MsgConnect Forum