comparison src/ch/ethz/ssh2/packets/PacketSessionPtyRequest.java @ 273:91a31873c42a ganymed

start conversion from trilead to ganymed
author Carl Byington <carl@five-ten-sg.com>
date Fri, 18 Jul 2014 11:21:46 -0700
parents
children 071eccdff8ea
comparison
equal deleted inserted replaced
272:ce2f4e397703 273:91a31873c42a
1 /*
2 * Copyright (c) 2006-2011 Christian Plattner. All rights reserved.
3 * Please refer to the LICENSE.txt for licensing details.
4 */
5 package ch.ethz.ssh2.packets;
6
7 /**
8 * @author Christian Plattner
9 * @version $Id: PacketSessionPtyRequest.java 160 2014-05-01 14:30:26Z dkocher@sudo.ch $
10 */
11 public final class PacketSessionPtyRequest {
12 private final byte[] payload;
13
14 public PacketSessionPtyRequest(int recipientChannelID, boolean wantReply, String term,
15 int character_width, int character_height, int pixel_width, int pixel_height,
16 byte[] terminal_modes) {
17 TypesWriter tw = new TypesWriter();
18 tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST);
19 tw.writeUINT32(recipientChannelID);
20 tw.writeString("pty-req");
21 tw.writeBoolean(wantReply);
22 tw.writeString(term);
23 tw.writeUINT32(character_width);
24 tw.writeUINT32(character_height);
25 tw.writeUINT32(pixel_width);
26 tw.writeUINT32(pixel_height);
27 tw.writeString(terminal_modes, 0, terminal_modes.length);
28
29 payload = tw.getBytes();
30 }
31
32 public byte[] getPayload() {
33 return payload;
34 }
35 }