示例#1
0
        public Entry RegisterChannelEventReceiver(SSHChannel ch, ISSHChannelEventReceiver r) {
            lock(this) {
                Entry e = new Entry(ch, r, _channel_sequence++);

                if(_first==null)
                    _first = e;
                else {
                    e.Next = _first;
                    _first = e;
                }

                _count++;
                return e;
            }
        }
示例#2
0
文件: SCP.cs 项目: FNKGino/poderosa
 public abstract void Run(SSHChannel channel);
示例#3
0
 public void EstablishPortforwarding(ISSHChannelEventReceiver rec, SSHChannel channel)
 {
     _pf = channel;
 }
示例#4
0
 public abstract void Run(SSHChannel channel); //start scp operation
示例#5
0
 public Entry(SSHChannel ch, ISSHChannelEventReceiver r, int seq)
 {
     _channel  = ch;
     _receiver = r;
     _localID  = seq;
 }
 public void OpenShell()
 {
     _channel = _connection.OpenShell(this);
 }
示例#7
0
 public SynchronizedSSHChannel(SSHChannel ch) {
     _channel = ch;
     _connection = _channel.Connection;
     _closed = false;
 }
示例#8
0
 internal void RegisterChannel(int local_id, SSHChannel ch) {
     FindChannelEntry(local_id).Channel = ch;
 }
示例#9
0
 internal void SetChannel(SSHChannel channel)
 {
     _channel = channel;
 }
示例#10
0
 public void Connect(Socket s)
 {
     _params.WindowSize = 0x1000;
     _params.IdentityFile = SSH2PrivateKeyFile;
     _conn = SSHConnection.Connect(_params, this, s);
     _pf = _conn.OpenShell(this);
     SSHConnectionInfo ci = _conn.ConnectionInfo;
 }
示例#11
0
 internal void SetChannel(SSHChannel channel)
 {
     _channel = channel;
 }
示例#12
0
 public override void Run(SSHChannel channel)
 {
     _channel = channel;
     _channelReadyEvent.WaitOne();
     SendResponse(); //これでやりとりがはじまる
 }
示例#13
0
 public abstract void Run(SSHChannel channel); //start scp operation
示例#14
0
文件: SCP.cs 项目: FNKGino/poderosa
        public override void Run(SSHChannel channel)
        {
            _channel = channel;

            try {
                WaitAndReset();
                Debug.Assert(_state == State.Failed || _state == State.WaitingFileInfoResponse);
                if (_state == State.Failed)
                    return;

                TransmitFileInfo();
                WaitAndReset();
                Debug.Assert(_state == State.Failed || _state == State.SendingContent);
                if (_state == State.Failed)
                    return;

                TransmitFileContent();
                WaitAndReset();
                Debug.Assert(_state == State.Failed || _state == State.Completed);

                if (_state == State.Completed) {
                    SuccessfullyExit();
                }
            }
            catch (Exception ex) {
                UnsuccessfullyExit(ex);
            }
            finally {
                _param.LocalSource.Close();
            }
        }
示例#15
0
 public override void EstablishPortforwarding(ISSHChannelEventReceiver receiver, SSHChannel channel) {
     try {
         Channel ch = (Channel)receiver;
         ch.FixChannel(channel);
         ch.OnChannelReady();
         ch.StartAsyncReceive();
     }
     catch (Exception ex) {
         Debug.WriteLine(ex.StackTrace);
         Util.InterThreadWarning(ex.Message);
     }
 }
示例#16
0
文件: SCP.cs 项目: FNKGino/poderosa
 public override void Run(SSHChannel channel)
 {
     _channel = channel;
     _channelReadyEvent.WaitOne();
     SendResponse(); //これでやりとりがはじまる
 }
示例#17
0
        public Channel(string servername, string rd, int cid, SSHChannel channel, Socket socket) {
            _serverName = servername;
            _remoteDescription = rd;
            _connectionID = cid;
            _wroteClosedLog = false;

            if (channel != null)
                _channel = new SynchronizedSSHChannel(channel);
            _socket = new SynchronizedSocket(socket);
            _buffer = new byte[0x1000];
            _channelReady = new ManualResetEvent(false);
        }
示例#18
0
 public Entry(SSHChannel ch, ISSHChannelEventReceiver r, int seq) {
     _channel = ch;
     _receiver = r;
     _localID = seq;
 }
示例#19
0
 public void FixChannel(SSHChannel ch) {
     _channel = new SynchronizedSSHChannel(ch);
     Env.Log.LogChannelOpened(_remoteDescription, _connectionID);
 }
 public virtual void EstablishPortforwarding(ISSHChannelEventReceiver receiver, SSHChannel channel)
 {
 }
示例#21
0
 public override void Run(SSHChannel channel)
 {
     _channel = channel;
     _channelReadyEvent.WaitOne();
     SendResponse(); //����ł��Ƃ肪�͂��܂�
 }
 public void OpenSubsystem(string subsystem)
 {
     SSH2Connection ssh2 = _connection as SSH2Connection;
     if (ssh2 == null)
         throw new SSHException("OpenSubsystem() can be applied to only SSH2 connection");
     _channel = ssh2.OpenSubsystem(this, subsystem);
 }
示例#23
0
 internal void RegisterChannel(int local_id, SSHChannel ch)
 {
     FindChannelEntry(local_id).Channel = ch;
 }