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:maxPacketSize:characterSet:username:authResponse:database:authPluginName:)Creates a newMySQLHandshakeResponse41
Instance Properties
authPluginNameauth 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.authResponseauth-response(string.NUL) opaque authentication response data generated by Authentication Method indicated by the plugin name field.capabilitiescapability_flags(4) capability flags of the client as defined inProtocol::CapabilityFlagscharacterSetcharacter_set(1) connection’s default character set as defined inProtocol::CharacterSet.databasedatabase(string.NUL) initial database for the connection – this string should be interpreted using the character set indicated by character set field.maxPacketSizemax_packet_size(4) max size of a command packet that the client wants to send to the serverusernameusername(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
decode(from:capabilities:)MySQLPacketDecodableconformance.