Ejemplo n.º 1
0
        ///// <summary>
        ///// Create a network listener object.
        ///// </summary>
        ///// <param name="port">Network port to listen to.</param>
        ///// <returns>Network listener implementation.</returns>
        //public static INetworkListener CreateNetworkListener(int port)
        //{
        //    return implementation.CreateNetworkListenerImpl(port);
        //}

        ///// <summary>
        ///// Create a network stream object.
        ///// </summary>
        ///// <param name="host">Network host.</param>
        ///// <param name="port">Network port.</param>
        ///// <param name="useTls">Use TLS layer?</param>
        ///// <param name="noDelay">No delay?</param>
        ///// <param name="ignoreSslPolicyErrors">Ignore SSL policy errors?</param>
        ///// <returns>Network stream implementation.</returns>
        //public static INetworkStream CreateNetworkStream(string host, int port, bool useTls, bool noDelay, bool ignoreSslPolicyErrors)
        //{
        //    return implementation.CreateNetworkStreamImpl(host, port, useTls, noDelay, ignoreSslPolicyErrors);
        //}

        /// <summary>
        /// Checks whether specified <paramref name="exception"/> represents a socket exception.
        /// </summary>
        /// <param name="exception">Exception to validate.</param>
        /// <param name="errorCode">Error code, valid if <paramref name="exception"/> is socket exception.</param>
        /// <param name="errorDescriptor">Error descriptor, valid if <paramref name="exception"/> is socket exception.</param>
        /// <returns>True if <paramref name="exception"/> is socket exception, false otherwise.</returns>
        public static bool IsSocketException(Exception exception, out int errorCode, out string errorDescriptor)
        {
            return(implementation.IsSocketExceptionImpl(exception, out errorCode, out errorDescriptor));
        }