コード例 #1
0
        internal static bool GetReusePort(TcpHandle tcpHandle)
        {
            if (IsWindows)
            {
                return(GetReuseAddress(tcpHandle));
            }

            IntPtr socketHandle = GetSocketHandle(tcpHandle);

            return(UnixApi.GetReusePort(socketHandle));
        }
コード例 #2
0
        internal static bool GetReusePort(TcpHandle tcpHandle)
        {
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                return(GetReuseAddress(tcpHandle));
            }

            IntPtr socketHandle = GetSocketHandle(tcpHandle);

            return(UnixApi.GetReusePort(socketHandle));
        }