comparison src/com/trilead/ssh2/packets/PacketSessionStartShell.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
2 package com.trilead.ssh2.packets;
3
4 /**
5 * PacketSessionStartShell.
6 *
7 * @author Christian Plattner, plattner@trilead.com
8 * @version $Id: PacketSessionStartShell.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
9 */
10 public class PacketSessionStartShell {
11 byte[] payload;
12
13 public int recipientChannelID;
14 public boolean wantReply;
15
16 public PacketSessionStartShell(int recipientChannelID, boolean wantReply) {
17 this.recipientChannelID = recipientChannelID;
18 this.wantReply = wantReply;
19 }
20
21 public byte[] getPayload() {
22 if (payload == null) {
23 TypesWriter tw = new TypesWriter();
24 tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST);
25 tw.writeUINT32(recipientChannelID);
26 tw.writeString("shell");
27 tw.writeBoolean(wantReply);
28 payload = tw.getBytes();
29 }
30
31 return payload;
32 }
33 }