⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 packetsessionx11request.java

📁 thinking in java4 src
💻 JAVA
字号:

package ch.ethz.ssh2.packets;

/**
 * PacketSessionX11Request.
 * 
 * @author Christian Plattner, plattner@inf.ethz.ch
 * @version $Id: PacketSessionX11Request.java,v 1.2 2005/12/05 17:13:27 cplattne Exp $
 */
public class PacketSessionX11Request
{
	byte[] payload;

	public int recipientChannelID;
	public boolean wantReply;

	public boolean singleConnection;
	String x11AuthenticationProtocol;
	String x11AuthenticationCookie;
	int x11ScreenNumber;

	public PacketSessionX11Request(int recipientChannelID, boolean wantReply, boolean singleConnection,
			String x11AuthenticationProtocol, String x11AuthenticationCookie, int x11ScreenNumber)
	{
		this.recipientChannelID = recipientChannelID;
		this.wantReply = wantReply;

		this.singleConnection = singleConnection;
		this.x11AuthenticationProtocol = x11AuthenticationProtocol;
		this.x11AuthenticationCookie = x11AuthenticationCookie;
		this.x11ScreenNumber = x11ScreenNumber;
	}

	public byte[] getPayload()
	{
		if (payload == null)
		{
			TypesWriter tw = new TypesWriter();
			tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST);
			tw.writeUINT32(recipientChannelID);
			tw.writeString("x11-req");
			tw.writeBoolean(wantReply);

			tw.writeBoolean(singleConnection);
			tw.writeString(x11AuthenticationProtocol);
			tw.writeString(x11AuthenticationCookie);
			tw.writeUINT32(x11ScreenNumber);

			payload = tw.getBytes();
		}
		return payload;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -