comparison app/src/main/java/ch/ethz/ssh2/packets/PacketWindowChange.java @ 438:d29cce60f393

migrate from Eclipse to Android Studio
author Carl Byington <carl@five-ten-sg.com>
date Thu, 03 Dec 2015 11:23:55 -0800
parents src/ch/ethz/ssh2/packets/PacketWindowChange.java@071eccdff8ea
children
comparison
equal deleted inserted replaced
437:208b31032318 438:d29cce60f393
1 package ch.ethz.ssh2.packets;
2
3 /**
4 * Indicates that that size of the terminal (window) size has changed on the client side.
5 * <p/>
6 * See section 6.7 of RFC 4254.
7 *
8 * @author Kohsuke Kawaguchi
9 */
10 public final class PacketWindowChange {
11 private final byte[] payload;
12
13 public PacketWindowChange(int recipientChannelID,
14 int character_width, int character_height, int pixel_width, int pixel_height) {
15 TypesWriter tw = new TypesWriter();
16 tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST);
17 tw.writeUINT32(recipientChannelID);
18 tw.writeString("window-change");
19 tw.writeBoolean(false);
20 tw.writeUINT32(character_width);
21 tw.writeUINT32(character_height);
22 tw.writeUINT32(pixel_width);
23 tw.writeUINT32(pixel_height);
24 payload = tw.getBytes();
25 }
26
27 public byte[] getPayload() {
28 return payload;
29 }
30 }