Documentation
WASIX
sock_leave_multicast_v4

sock_leave_multicast_v4()

Leaves a particular multicast IPv4 group.

Description

The sock_leave_multicast_v4() function allows a socket to leave a specified multicast IPv4 group on a specific interface.

Syntax

  ;;; Leaves a particular multicast IPv4 group
  (@interface func (export "sock_leave_multicast_v4")
    ;;; Socket descriptor
    (param $fd $fd)
    ;;; Multicast group to leave
    (param $multiaddr (@witx const_pointer $addr_ip4))
    ;;; Interface that will left
    (param $interface (@witx const_pointer $addr_ip4))
    (result $error (expected (error $errno)))
  )

Parameters

  • ctx: A mutable reference to the function environment.
  • sock: The socket descriptor.
  • multiaddr: A WebAssembly pointer to the IPv4 multicast group to be left.
  • iface: A WebAssembly pointer to the IPv4 interface to leave the multicast group.

Return Value

The function returns an Errno value indicating the outcome of the operation. If the operation is successful, Errno::Success is returned. If an error occurs, an appropriate Errno value is returned.

Notes

  • The sock_leave_multicast_v4() function allows a socket to leave a specified multicast IPv4 group on a specific interface.
  • The multiaddr parameter specifies the IPv4 multicast group to leave.
  • The iface parameter specifies the IPv4 interface from which to leave the multicast group.
  • The behavior and limitations of the sock_leave_multicast_v4() function may vary depending on the specific runtime environment and underlying networking implementation. It is important to consult the documentation or specifications of the specific environment to understand its behavior in that context.