Package com.alibaba.otter.canal.protocol.CanalPacket

Examples of com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.toByteString()


            //
            ClientAuth ca = ClientAuth.newBuilder().setUsername(username).setNetReadTimeout(10000).setNetWriteTimeout(
                                                                                                                      10000).build();
            writeWithHeader(
                            channel,
                            Packet.newBuilder().setType(PacketType.CLIENTAUTHENTICATION).setBody(ca.toByteString()).build().toByteArray());
            //
            Packet ack = Packet.parseFrom(readNextPacket(channel));
            if (ack.getType() != PacketType.ACK) {
                throw new CanalClientException("unexpected packet type when ack is expected");
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.