	public:
		int result;
		int roleid;
		int provider_link_id;
		unsigned int localsid;
		enum { PROTOCOL_TYPE = PROTOCOL_PLAYERLOGOUT };
	public:
		PlayerLogout() { type = PROTOCOL_PLAYERLOGOUT; }
		PlayerLogout(void*) : Protocol(PROTOCOL_PLAYERLOGOUT) { }
		PlayerLogout (int l_result,int l_roleid,int l_provider_link_id = -1,
			unsigned int l_localsid = 0)
			 : result(l_result),roleid(l_roleid),provider_link_id(l_provider_link_id)
			,localsid(l_localsid)
		{
			type = PROTOCOL_PLAYERLOGOUT;
		}

		PlayerLogout(const PlayerLogout &rhs)
			: Protocol(rhs),result(rhs.result),roleid(rhs.roleid),provider_link_id(rhs.provider_link_id)
			,localsid(rhs.localsid) { }

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

		OctetsStream& marshal(OctetsStream & os) const
		{
			os << result;
			os << roleid;
			os << provider_link_id;
			os << localsid;
			return os;
		}

		const OctetsStream& unmarshal(const OctetsStream &os)
		{
			os >> result;
			os >> roleid;
			os >> provider_link_id;
			os >> localsid;
			return os;
		}

		int PriorPolicy( ) const { return 101; }

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