comparison src/ch/ethz/ssh2/packets/PacketSessionX11Request.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: PacketSessionX11Request.java 160 2014-05-01 14:30:26Z dkocher@sudo.ch $
10 */
11 public final class PacketSessionX11Request {
12 private final byte[] payload;
13
14 public PacketSessionX11Request(int recipientChannelID, boolean wantReply, boolean singleConnection,
15 String x11AuthenticationProtocol, String x11AuthenticationCookie, int x11ScreenNumber) {
16 TypesWriter tw = new TypesWriter();
17 tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST);
18 tw.writeUINT32(recipientChannelID);
19 tw.writeString("x11-req");
20 tw.writeBoolean(wantReply);
21
22 tw.writeBoolean(singleConnection);
23 tw.writeString(x11AuthenticationProtocol);
24 tw.writeString(x11AuthenticationCookie);
25 tw.writeUINT32(x11ScreenNumber);
26
27 payload = tw.getBytes();
28 }
29
30 public byte[] getPayload() {
31 return payload;
32 }
33 }