re-implement RpcCodec with ProtobufCodec