Search in sources :

Example 11 with HeaderPacket

use of com.alibaba.otter.canal.parse.driver.mysql.packets.HeaderPacket in project canal by alibaba.

the class BinlogDumpCommandBuilder method assembleHeaderBytes.

private byte[] assembleHeaderBytes(int length) {
    HeaderPacket header = new HeaderPacket();
    header.setPacketBodyLength(length);
    header.setPacketSequenceNumber((byte) 0x00);
    return header.toBytes();
}
Also used : HeaderPacket(com.alibaba.otter.canal.parse.driver.mysql.packets.HeaderPacket)

Aggregations

HeaderPacket (com.alibaba.otter.canal.parse.driver.mysql.packets.HeaderPacket)11 PacketWithHeaderPacket (com.alibaba.otter.canal.parse.driver.mysql.packets.PacketWithHeaderPacket)3 BinlogDumpCommandPacket (com.alibaba.otter.canal.parse.driver.mysql.packets.client.BinlogDumpCommandPacket)2 ErrorPacket (com.alibaba.otter.canal.parse.driver.mysql.packets.server.ErrorPacket)2 IOException (java.io.IOException)2 ClientAuthenticationPacket (com.alibaba.otter.canal.parse.driver.mysql.packets.client.ClientAuthenticationPacket)1 QuitCommandPacket (com.alibaba.otter.canal.parse.driver.mysql.packets.client.QuitCommandPacket)1 HandshakeInitializationPacket (com.alibaba.otter.canal.parse.driver.mysql.packets.server.HandshakeInitializationPacket)1 Reply323Packet (com.alibaba.otter.canal.parse.driver.mysql.packets.server.Reply323Packet)1