Structure
MySQLPacket.HandshakeResponse41
Protocol::HandshakeResponsestruct HandshakeResponse41
Overview
Depending on the servers support for the CLIENT_PROTOCOL_41 capability and the client’s understanding of that flag the client has to send either a Protocol::HandshakeResponse41 or Protocol::HandshakeResponse320.
Handshake Response Packet sent by 4.1+ clients supporting CLIENT_PROTOCOL_41 capability, if the server announced it in its Initial Handshake Packet. Otherwise (talking to an old server) the Protocol::HandshakeResponse320 packet must be used.
https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse
Topics
Initializers
init(capabilities: MySQLProtocol.CapabilityFlags, maxPacketSize: UInt32, characterSet: MySQLProtocol.CharacterSet, username: String, authResponse: ByteBuffer, database: String, authPluginName: String)Creates a newMySQLHandshakeResponse41
Instance Properties
var authPluginName: Stringauth plugin name (string.NUL) the Authentication Method used by the client to generate auth-response value in this packet. This is an UTF-8 string.var authResponse: ByteBufferauth-response(string.NUL) opaque authentication response data generated by Authentication Method indicated by the plugin name field.var capabilities: MySQLProtocol.CapabilityFlagscapability_flags(4) capability flags of the client as defined inProtocol::CapabilityFlagsvar characterSet: MySQLProtocol.CharacterSetcharacter_set(1) connection’s default character set as defined inProtocol::CharacterSet.var database: Stringdatabase(string.NUL) initial database for the connection – this string should be interpreted using the character set indicated by character set field.var maxPacketSize: UInt32max_packet_size(4) max size of a command packet that the client wants to send to the servervar username: Stringusername(string.fix_len) name of the SQL account which client wants to log in this string should be interpreted using the character set indicated by character set field.
Instance Methods
Type Methods
static func decode(from: inout MySQLPacket, capabilities: MySQLProtocol.CapabilityFlags) throws -> MySQLPacket.HandshakeResponse41MySQLPacketDecodableconformance.