Mercurial > 510Connectbot
comparison src/com/trilead/ssh2/packets/PacketChannelTrileadPing.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 * PacketChannelTrileadPing. | |
6 * | |
7 * @author Christian Plattner, plattner@trilead.com | |
8 * @version $Id: PacketChannelTrileadPing.java,v 1.1 2008/03/03 07:01:36 | |
9 * cplattne Exp $ | |
10 */ | |
11 public class PacketChannelTrileadPing { | |
12 byte[] payload; | |
13 | |
14 public int recipientChannelID; | |
15 | |
16 public PacketChannelTrileadPing(int recipientChannelID) { | |
17 this.recipientChannelID = recipientChannelID; | |
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("trilead-ping"); | |
26 tw.writeBoolean(true); | |
27 payload = tw.getBytes(); | |
28 } | |
29 | |
30 return payload; | |
31 } | |
32 } |