internal static extern unsafe Error SetIPv4MulticastOption(SafeHandle socket, MulticastOption multicastOption, IPv4MulticastOption *option);
 private static extern unsafe Error DangerousSetIPv4MulticastOption(int socket, MulticastOption multicastOption, IPv4MulticastOption *option);
        internal static unsafe Error SetIPv4MulticastOption(SafeHandle socket, MulticastOption multicastOption, IPv4MulticastOption *option)
        {
            bool release = false;

            try
            {
                socket.DangerousAddRef(ref release);
                return(DangerousSetIPv4MulticastOption((int)socket.DangerousGetHandle(), multicastOption, option));
            }
            finally
            {
                if (release)
                {
                    socket.DangerousRelease();
                }
            }
        }
Exemplo n.º 4
0
 internal static extern unsafe Error GetIPv4MulticastOption(int socket, MulticastOption multicastOption, IPv4MulticastOption *option);