Search in sources :

Example 1 with PseudoTerminalModes

use of com.sshtools.client.PseudoTerminalModes in project agileway by fangjinuo.

the class SynergySessionedChannel method pty.

@Override
public void pty(String term, int termWidthCharacters, int termHeightCharacters, int termWidthPixels, int termHeightPixels, Map<PTYMode, Integer> terminalModes) throws SshException {
    final PseudoTerminalModes modes = new PseudoTerminalModes();
    if (terminalModes != null) {
        Collects.forEach(terminalModes, new Consumer2<PTYMode, Integer>() {

            @Override
            public void accept(PTYMode ptyMode, Integer value) {
                try {
                    modes.setTerminalMode(ptyMode.getOpcodeInt(), value);
                } catch (Throwable ex) {
                // ignore it
                }
            }
        });
    }
    this.channel.allocatePseudoTerminal(term, termWidthCharacters, termHeightCharacters, termWidthPixels, termHeightPixels, modes);
}
Also used : PseudoTerminalModes(com.sshtools.client.PseudoTerminalModes) PTYMode(com.jn.agileway.ssh.client.utils.PTYMode)

Aggregations

PTYMode (com.jn.agileway.ssh.client.utils.PTYMode)1 PseudoTerminalModes (com.sshtools.client.PseudoTerminalModes)1