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; } }
public abstract void Run(SSHChannel channel);
public void EstablishPortforwarding(ISSHChannelEventReceiver rec, SSHChannel channel) { _pf = channel; }
public abstract void Run(SSHChannel channel); //start scp operation
public Entry(SSHChannel ch, ISSHChannelEventReceiver r, int seq) { _channel = ch; _receiver = r; _localID = seq; }
public void OpenShell() { _channel = _connection.OpenShell(this); }
public SynchronizedSSHChannel(SSHChannel ch) { _channel = ch; _connection = _channel.Connection; _closed = false; }
internal void RegisterChannel(int local_id, SSHChannel ch) { FindChannelEntry(local_id).Channel = ch; }
internal void SetChannel(SSHChannel channel) { _channel = channel; }
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; }
public override void Run(SSHChannel channel) { _channel = channel; _channelReadyEvent.WaitOne(); SendResponse(); //これでやりとりがはじまる }
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(); } }
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); } }
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); }
public void FixChannel(SSHChannel ch) { _channel = new SynchronizedSSHChannel(ch); Env.Log.LogChannelOpened(_remoteDescription, _connectionID); }
public virtual void EstablishPortforwarding(ISSHChannelEventReceiver receiver, SSHChannel channel) { }
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); }