IpLeaveMulticastGroup
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
long IpLeaveMulticastGroup( dword socket, dword ifIndex, dword ipv4address ); // form 1long IpLeaveMulticastGroup( dword socket, dword ifIndex, byte ipv6Address[] ); // form 2long IpLeaveMulticastGroup( dword socket, dword ifIndex, IP_Address multicastAddress ); // form 3
Description
Leaves a previously joined multicast group on the given socket. After that, no multicast messages are received anymore. To receive multicast messages, the multicast group has to be joined with IpJoinMulticastGroup before. Before multicast messages can be sent, IpSetMulticastInterface has to be called before. Note: The function is dependent on the selected stack. This functionality cannot be used in connection with the operating system TCP/IP stack.Parameters
- socket: The socket handle.
- ifIndex: The 1-based network interface index. All adapter addresses including the local loopback address are taken into account in the stack of the operating system. The order depends on how the operating system lists the adapters. All assigned addresses including the VLAN addresses are taken into account in the CANoe DE product stack.
- ipv4address: The numerical IPv4 address of the destination.
- ipv6Address: The local IPv6 address in a 16 byte array.
- multicastAddress: The IP multicast address of the destination.
Return Values
- 0: The function completed successfully.
- WSA_INVALID_PARAMETER (87): The specified network interface index was invalid.
- SOCKET_ERROR (-1): The function failed. Call IpGetLastSocketError to get a more specific error code.