Mercurial > 510Connectbot
comparison src/com/trilead/ssh2/packets/PacketSessionPtyResize.java @ 0:0ce5cc452d02
initial version
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 22 May 2014 10:41:19 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0ce5cc452d02 |
---|---|
1 package com.trilead.ssh2.packets; | |
2 | |
3 public class PacketSessionPtyResize { | |
4 byte[] payload; | |
5 | |
6 public int recipientChannelID; | |
7 public int width; | |
8 public int height; | |
9 public int pixelWidth; | |
10 public int pixelHeight; | |
11 | |
12 public PacketSessionPtyResize(int recipientChannelID, int width, int height, int pixelWidth, int pixelHeight) { | |
13 this.recipientChannelID = recipientChannelID; | |
14 this.width = width; | |
15 this.height = height; | |
16 this.pixelWidth = pixelWidth; | |
17 this.pixelHeight = pixelHeight; | |
18 } | |
19 | |
20 public byte[] getPayload() { | |
21 if (payload == null) { | |
22 TypesWriter tw = new TypesWriter(); | |
23 tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST); | |
24 tw.writeUINT32(recipientChannelID); | |
25 tw.writeString("window-change"); | |
26 tw.writeBoolean(false); | |
27 tw.writeUINT32(width); | |
28 tw.writeUINT32(height); | |
29 tw.writeUINT32(pixelWidth); | |
30 tw.writeUINT32(pixelHeight); | |
31 payload = tw.getBytes(); | |
32 } | |
33 | |
34 return payload; | |
35 } | |
36 } | |
37 | |
38 |