Пример #1
0
        public TcpClientChannel TryConnect(NetworkPath netPath, int timeoutInMsec, out NetworkTransportException failureEx)
        {
            TcpClientChannel result = null;

            TcpClientChannel.TryOpenChannel(netPath, timeoutInMsec, out result, out failureEx);
            return(result);
        }
Пример #2
0
        internal static TcpClientChannel OpenChannel(NetworkPath netPath, int timeoutInMs)
        {
            NetworkTransportException ex     = null;
            TcpClientChannel          result = null;

            if (TcpClientChannel.TryOpenChannel(netPath, timeoutInMs, out result, out ex))
            {
                return(result);
            }
            throw ex;
        }