Search in sources :

Example 1 with HandshakeResponse41Packet

use of io.shardingjdbc.proxy.transport.mysql.packet.handshake.HandshakeResponse41Packet in project sharding-jdbc by shardingjdbc.

the class MySQLFrontendHandler method auth.

@Override
protected void auth(final ChannelHandlerContext context, final ByteBuf message) {
    MySQLPacketPayload mysqlPacketPayload = new MySQLPacketPayload(message);
    // TODO use authPluginData to auth
    HandshakeResponse41Packet response41 = new HandshakeResponse41Packet(mysqlPacketPayload);
    context.writeAndFlush(new OKPacket(response41.getSequenceId() + 1, 0L, 0L, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, ""));
}
Also used : HandshakeResponse41Packet(io.shardingjdbc.proxy.transport.mysql.packet.handshake.HandshakeResponse41Packet) MySQLPacketPayload(io.shardingjdbc.proxy.transport.mysql.packet.MySQLPacketPayload) OKPacket(io.shardingjdbc.proxy.transport.mysql.packet.generic.OKPacket)

Aggregations

MySQLPacketPayload (io.shardingjdbc.proxy.transport.mysql.packet.MySQLPacketPayload)1 OKPacket (io.shardingjdbc.proxy.transport.mysql.packet.generic.OKPacket)1 HandshakeResponse41Packet (io.shardingjdbc.proxy.transport.mysql.packet.handshake.HandshakeResponse41Packet)1