public request ( |
||
session | ||
channel | ||
return | void |
public void request(Session session, Channel channel)
{
Buffer buf=new Buffer();
Packet packet=new Packet(buf);
//byte SSH_MSG_CHANNEL_REQUEST
//uint32 recipient_channel
//string "window-change"
//boolean FALSE
//uint32 terminal width, columns
//uint32 terminal height, rows
//uint32 terminal width, pixels
//uint32 terminal height, pixels
packet.reset();
buf.WriteByte((byte) Session.SSH_MSG_CHANNEL_REQUEST);
buf.WriteInt(channel.getRecipient());
buf.WriteString(Util.getBytes("window-change"));
buf.WriteByte((byte)(waitForReply() ? 1 : 0));
buf.WriteInt(width_columns);
buf.WriteInt(height_rows);
buf.WriteInt(width_pixels);
buf.WriteInt(height_pixels);
session.write(packet);
}
public bool waitForReply(){ return false; }
public void setPtySize(int col, int row, int wp, int hp) { //if(thread==null) return; try { RequestWindowChange request = new RequestWindowChange(); request.setSize(col, row, wp, hp); request.request(session, this); } catch (Exception e) { throw new JSchException("ChannelShell.setPtySize: " + e.ToString()); } }