Пример #1
0
 public override void CleanupErrorStatus()
 {
     if (_channel != null)
     {
         _channel.Close();
     }
     base.CleanupErrorStatus();
 }
Пример #2
0
        /// <summary>
        /// Close channel.
        /// </summary>
        public void Close()
        {
            lock (_statusSync) {
                if (_status != StreamStatus.Opened && _status != StreamStatus.Error)
                {
                    return;
                }

                _status = StreamStatus.Closing;
            }

            _channel.SendEOF();

            if (_status != StreamStatus.Closing)
            {
                return;
            }

            _channel.Close();

            lock (_statusSync) {
                if (_status == StreamStatus.Closing)
                {
                    _status = StreamStatus.Closed;
                }
            }
        }
Пример #3
0
        public void OnChannelEOF()
        {
            m_Channel.Close();

            OnTrace(ErlTraceLevel.Ctrl, Direction.Inbound, "Channel EOF");
            //close connection
            m_Connection.Close();
        }
Пример #4
0
 public void Close()
 {
     lock (_connection) {
         if (!_closed)
         {
             _closed = true;
             _channel.Close();
         }
     }
 }
Пример #5
0
        public void SetHTTPRequestTimeout()
        {
            StartRequest = DateTime.Now;

            int seconds = TimeoutSeconds;

            while (seconds > 0)
            {
                seconds--; Thread.Sleep(1000);
                if (EndRequest != null)
                {
                    break;
                }
            }

            if (seconds <= 0 && EndRequest == null)
            {
                //Close anything
                try
                {
                    _conn.CancelForwardedPort("localhost", 80);
                }
                catch { }
                try
                {
                    _pf.Close();
                }
                catch { }
                try
                {
                    _conn.Disconnect("");
                }
                catch { }
                try
                {
                    _conn.Close();
                }
                catch { }

                passControl(LineIndex, false, "", "HTTP Request Timeout");
            }
        }
Пример #6
0
 public void Close()
 {
     if (!_ready || _channel == null)
     {
         throw new Exception("channel not ready");
     }
     _channel.Close();
     if (_channel.Connection().ChannelCount() <= 1)          //close last channel
     {
         _channel.Connection().Close();
     }
 }
Пример #7
0
        internal override void Close()
        {
            if (_socketStatus != SocketStatus.Ready)
            {
                throw new SSHException("channel not ready");
            }

            _channel.Close();
            if (_channel.Connection.ChannelCollection.Count <= 1) //close last channel
            {
                _channel.Connection.Close();
            }
        }
Пример #8
0
        public void OnData(byte[] data, int offset, int length)
        {
            byte[] bytes = new byte[length];
            Buffer.BlockCopy(data, offset, bytes, 0, length);
            string text = Encoding.UTF8.GetString(bytes);

            textReceived += text;

            if (state == OutputState.Ready)
            {
                state = OutputState.Executing;
            }

            // if the parser says we've received everything, close this channel
            if (Singleton <OutputParser> .Instance.CheckOutput(this))
            {
                chan.Close();
            }
        }
Пример #9
0
 public void OnChannelEOF()
 {
     Channel.Close();
 }
Пример #10
0
 protected override void Dispose(bool disposing)
 {
     m_Channel.Close();
     base.Dispose(disposing);
 }
Пример #11
0
 /// <summary>
 /// Close the subsystem and therefore close the channel.
 /// </summary>
 public void Close()
 {
     channel.Close();
 }
Пример #12
0
 public void OnChannelEOF()
 {
     _pf.Close();
     Debug.WriteLine("Channel EOF");
 }
Пример #13
0
 /// <summary>
 /// Implementing the interface members as the class implements from two interfaces
 /// Method to close the channel
 /// </summary>
 public void OnChannelEOF()
 {
     _channel.Close();
     //Framework.Logger.LogInfo("Channel EOF");
 }