Exemplo n.º 1
0
 public Task ResizeTerminalAsync(TerminalSize size)
 {
     return(SendAsync(
                channel => ((SshShellChannel)channel).ResizePseudoTerminal(
                    size.Columns,
                    size.Rows)));
 }
Exemplo n.º 2
0
        //---------------------------------------------------------------------
        // Ctor.
        //---------------------------------------------------------------------

        public SshShellConnection(
            string username,
            IPEndPoint endpoint,
            ISshKey key,
            string terminal,
            TerminalSize terminalSize,
            CultureInfo language,
            ReceiveStringDataHandler receiveDataHandler,
            ReceiveErrorHandler receiveErrorHandler)
            : base(
                username,
                endpoint,
                key,
                (buf, offset, count) =>     // TODO: handle partial UTF-8 sequences
                receiveDataHandler(Encoding.GetString(buf, (int)offset, (int)count)),
                receiveErrorHandler)
        {
            this.terminal     = terminal;
            this.terminalSize = terminalSize;
            this.language     = language;
        }
Exemplo n.º 3
0
        //---------------------------------------------------------------------
        // Ctor.
        //---------------------------------------------------------------------

        public SshShellConnection(
            string username,
            IPEndPoint endpoint,
            ISshKey key,
            string terminal,
            TerminalSize terminalSize,
            CultureInfo language,
            ReceiveStringDataHandler receiveDataHandler,
            ReceiveErrorHandler receiveErrorHandler)
            : base(
                username,
                endpoint,
                key,
                receiveDataHandler,
                receiveErrorHandler,
                Encoding)
        {
            this.terminal     = terminal;
            this.terminalSize = terminalSize;
            this.language     = language;
        }