	public:
		int aid;
		int userid;
		int retcode;
		std::vector<WebRole> rolelist;
		int64_t messageid;
		int reserved1;
		int reserved2;
		enum { PROTOCOL_TYPE = PROTOCOL_WEBGETROLELIST_RE };
	public:
		WebGetRoleList_Re() { type = PROTOCOL_WEBGETROLELIST_RE; }
		WebGetRoleList_Re(void*) : Protocol(PROTOCOL_WEBGETROLELIST_RE) { }
		WebGetRoleList_Re (int l_aid,int l_userid,int l_retcode,
			const std::vector<WebRole>& l_rolelist,int64_t l_messageid,int l_reserved1 = 0,
			int l_reserved2 = 0)
			 : aid(l_aid),userid(l_userid),retcode(l_retcode)
			,rolelist(l_rolelist),messageid(l_messageid),reserved1(l_reserved1)
			,reserved2(l_reserved2)
		{
			type = PROTOCOL_WEBGETROLELIST_RE;
		}

		WebGetRoleList_Re(const WebGetRoleList_Re &rhs)
			: Protocol(rhs),aid(rhs.aid),userid(rhs.userid),retcode(rhs.retcode)
			,rolelist(rhs.rolelist),messageid(rhs.messageid),reserved1(rhs.reserved1)
			,reserved2(rhs.reserved2) { }

		GNET::Protocol *Clone() const { return new WebGetRoleList_Re(*this); }

		OctetsStream& marshal(OctetsStream & os) const
		{
			os << aid;
			os << userid;
			os << retcode;
			os << rolelist;
			os << messageid;
			os << reserved1;
			os << reserved2;
			return os;
		}

		const OctetsStream& unmarshal(const OctetsStream &os)
		{
			os >> aid;
			os >> userid;
			os >> retcode;
			os >> rolelist;
			os >> messageid;
			os >> reserved1;
			os >> reserved2;
			return os;
		}

		int PriorPolicy( ) const { return 1; }

		bool SizePolicy(size_t size) const { return size <= 65536; }
