@Override public void unmarshallMessage(ByteBuf cb) { slaveServerId = cb.readInt(); reportHost = MysqlAPIUtils.getLengthCodedString(cb); reportUser = MysqlAPIUtils.getLengthCodedString(cb); reportPassword = MysqlAPIUtils.getLengthCodedString(cb); reportPort = cb.readShort(); }
@Override public void marshallMessage(ByteBuf cb) { cb.writeInt(slaveServerId); MysqlAPIUtils.putLengthCodedString(cb, reportHost, true /* codeNullasZero */); MysqlAPIUtils.putLengthCodedString(cb, reportUser, true /* codeNullasZero */); MysqlAPIUtils.putLengthCodedString(cb, reportPassword, true /* codeNullasZero */); cb.writeShort(reportPort); cb.writeZero(8); }