Beispiel #1
0
 void SetMembership(IPAddress multicastAddress, IPAddress interfaceAddress, uv_membership membership)
 {
     this.Validate();
     NativeMethods.UdpSetMembership(this.InternalHandle,
                                    multicastAddress,
                                    interfaceAddress,
                                    membership);
 }
Beispiel #2
0
        internal static void UdpSetMembership(IntPtr handle, IPAddress multicastAddress, IPAddress interfaceAddress, uv_membership membership)
        {
            Debug.Assert(handle != IntPtr.Zero);
            Debug.Assert(multicastAddress != null);

            string multicast_addr = multicastAddress.ToString();
            string interface_addr = interfaceAddress?.ToString();

            int result = uv_udp_set_membership(handle, multicast_addr, interface_addr, membership);

            ThrowIfError(result);
        }
Beispiel #3
0
 static extern int uv_udp_set_membership(IntPtr handle, string multicast_addr, string interface_addr, uv_membership membership);
Beispiel #4
0
        internal static void UdpSetMembership(IntPtr handle, IPAddress multicastAddress, IPAddress interfaceAddress, uv_membership membership)
        {
            Contract.Requires(handle != IntPtr.Zero);
            Contract.Requires(multicastAddress != null);

            string multicast_addr = multicastAddress.ToString();
            string interface_addr = interfaceAddress?.ToString();

            int result = uv_udp_set_membership(handle, multicast_addr, interface_addr, membership);

            if (result < 0)
            {
                throw CreateError((uv_err_code)result);
            }
        }