public class SendHandshakeResponsePacket
extends java.lang.Object
client_flags: CLIENT_xxx options. The list of possible flag values is in the description of the Handshake Initialisation Packet, for server_capabilities. For some of the bits, the server passed "what it's capable of". The client leaves some of the bits on, adds others, and passes back to the server. One important flag is: whether compression is desired.
max_packet_size: the maximum number of bytes in a stream for the client
charset_number: in the same domain as the server_language field that the server passes in the Handshake Initialization stream.
user: identification
scramble_buff: the password, after encrypting using the scramble_buff contents passed by the server (see "Password functions" section elsewhere in this document) if length is zero, no password was given
databasename: name of schema to use initially
Modifier and Type | Field and Description |
---|---|
private static byte[] |
_CLIENT_NAME |
private static byte[] |
_CLIENT_VERSION |
private static byte[] |
_JAVA_VENDOR |
private static byte[] |
_JAVA_VERSION |
private static byte[] |
_OS |
private static byte[] |
_PID |
private static byte[] |
_SERVER_HOST |
private static byte[] |
_THREAD |
Constructor and Description |
---|
SendHandshakeResponsePacket() |
Modifier and Type | Method and Description |
---|---|
static void |
send(PacketOutputStream pos,
java.lang.String username,
java.lang.String password,
HostAddress currentHost,
java.lang.String database,
long clientCapabilities,
long serverCapabilities,
byte serverLanguage,
byte packetSeq,
Options options,
ReadInitialHandShakePacket greetingPacket)
Send handshake response packet.
|
private static void |
writeConnectAttributes(PacketOutputStream pos,
java.lang.String connectionAttributes,
HostAddress currentHost) |
private static final byte[] _CLIENT_NAME
private static final byte[] _CLIENT_VERSION
private static final byte[] _SERVER_HOST
private static final byte[] _OS
private static final byte[] _PID
private static final byte[] _THREAD
private static final byte[] _JAVA_VENDOR
private static final byte[] _JAVA_VERSION
public static void send(PacketOutputStream pos, java.lang.String username, java.lang.String password, HostAddress currentHost, java.lang.String database, long clientCapabilities, long serverCapabilities, byte serverLanguage, byte packetSeq, Options options, ReadInitialHandShakePacket greetingPacket) throws java.io.IOException
pos
- output streamusername
- user namepassword
- passwordcurrentHost
- current hostnamedatabase
- database nameclientCapabilities
- client capabilitiesserverCapabilities
- server capabilitiesserverLanguage
- server language (utf8 / utf8mb4 collation)packetSeq
- packet sequenceoptions
- user optionsgreetingPacket
- server handshake packet informationjava.io.IOException
- if socket exception occurprivate static void writeConnectAttributes(PacketOutputStream pos, java.lang.String connectionAttributes, HostAddress currentHost) throws java.io.IOException
java.io.IOException