1 2 29 30 package com.jcraft.jsch; 31 32 class RequestWindowChange extends Request{ 33 int width_columns=80; 34 int height_rows=24; 35 int width_pixels=640; 36 int height_pixels=480; 37 void setSize(int col, int row, int wp, int hp){ 38 this.width_columns=col; 39 this.height_rows=row; 40 this.width_pixels=wp; 41 this.height_pixels=hp; 42 } 43 public void request(Session session, Channel channel) throws Exception { 44 super.request(session, channel); 45 46 Buffer buf=new Buffer(); 47 Packet packet=new Packet(buf); 48 49 packet.reset(); 58 buf.putByte((byte) Session.SSH_MSG_CHANNEL_REQUEST); 59 buf.putInt(channel.getRecipient()); 60 buf.putString("window-change".getBytes()); 61 buf.putByte((byte)(waitForReply() ? 1 : 0)); 62 buf.putInt(width_columns); 63 buf.putInt(height_rows); 64 buf.putInt(width_pixels); 65 buf.putInt(height_pixels); 66 write(packet); 67 } 68 } 69 | Popular Tags |