Exemplo n.º 1
0
 public override void CleanupErrorStatus()
 {
     if (_channel != null)
     {
         _channel.Close();
     }
     base.CleanupErrorStatus();
 }
Exemplo n.º 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;
                }
            }
        }
Exemplo n.º 3
0
        public void OnChannelEOF()
        {
            m_Channel.Close();

            OnTrace(ErlTraceLevel.Ctrl, Direction.Inbound, "Channel EOF");
            //close connection
            m_Connection.Close();
        }
Exemplo n.º 4
0
 public void Close()
 {
     lock (_connection) {
         if (!_closed)
         {
             _closed = true;
             _channel.Close();
         }
     }
 }
Exemplo n.º 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");
            }
        }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 9
0
 public void OnChannelEOF()
 {
     Channel.Close();
 }
Exemplo n.º 10
0
 protected override void Dispose(bool disposing)
 {
     m_Channel.Close();
     base.Dispose(disposing);
 }
Exemplo n.º 11
0
 /// <summary>
 /// Close the subsystem and therefore close the channel.
 /// </summary>
 public void Close()
 {
     channel.Close();
 }
Exemplo n.º 12
0
 public void OnChannelEOF()
 {
     _pf.Close();
     Debug.WriteLine("Channel EOF");
 }
Exemplo n.º 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");
 }