@Override public void allocatePTY(String term, int cols, int rows, int width, int height, Map<PTYMode, Integer> modes) throws ConnectionException, TransportException { sendChannelRequest( "pty-req", true, new Buffer.PlainBuffer() .putString(term) .putUInt32(cols) .putUInt32(rows) .putUInt32(width) .putUInt32(height) .putBytes(PTYMode.encode(modes)) ).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }
public static byte[] encode(Map<PTYMode, Integer> modes) { Buffer.PlainBuffer buf = new Buffer.PlainBuffer(); for (Entry<PTYMode, Integer> entry : modes.entrySet()) { buf.putByte(entry.getKey().getOpcode()); buf.putUInt32(entry.getValue()); } buf.putByte((byte) 0); return buf.getCompactData(); }
public static byte[] encode(Map<PTYMode, Integer> modes) { Buffer.PlainBuffer buf = new Buffer.PlainBuffer(); for (Entry<PTYMode, Integer> entry : modes.entrySet()) { buf.putByte(entry.getKey().getOpcode()); buf.putUInt32(entry.getValue()); } buf.putByte((byte) 0); return buf.getCompactData(); }
@Override public void allocatePTY(String term, int cols, int rows, int width, int height, Map<PTYMode, Integer> modes) throws ConnectionException, TransportException { sendChannelRequest( "pty-req", true, new Buffer.PlainBuffer() .putString(term) .putUInt32(cols) .putUInt32(rows) .putUInt32(width) .putUInt32(height) .putBytes(PTYMode.encode(modes)) ).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }
public static byte[] encode(Map<PTYMode, Integer> modes) { Buffer.PlainBuffer buf = new Buffer.PlainBuffer(); for (Entry<PTYMode, Integer> entry : modes.entrySet()) { buf.putByte(entry.getKey().getOpcode()); buf.putUInt32(entry.getValue()); } buf.putByte((byte) 0); return buf.getCompactData(); }
@Override public void allocatePTY(String term, int cols, int rows, int width, int height, Map<PTYMode, Integer> modes) throws ConnectionException, TransportException { sendChannelRequest( "pty-req", true, new Buffer.PlainBuffer() .putString(term) .putUInt32(cols) .putUInt32(rows) .putUInt32(width) .putUInt32(height) .putBytes(PTYMode.encode(modes)) ).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }