Esempio n. 1
0
        internal static bool GetReusePort(TcpHandle tcpHandle)
        {
            if (IsWindows)
            {
                return(GetReuseAddress(tcpHandle));
            }

            IntPtr socketHandle = GetSocketHandle(tcpHandle);

            return(UnixApi.GetReusePort(socketHandle));
        }
        internal static bool GetReusePort(TcpHandle tcpHandle)
        {
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                return(GetReuseAddress(tcpHandle));
            }

            IntPtr socketHandle = GetSocketHandle(tcpHandle);

            return(UnixApi.GetReusePort(socketHandle));
        }