	public:
		int userid;
		int64_t roleid;
		int64_t sn;
		int price;
		TimeInfo time;
		int64_t buyerroleid;
		int64_t messageid;
		int64_t timestamp;
		int reserved1;
		int reserved2;
		enum { PROTOCOL_TYPE = PROTOCOL_SHELF };
	public:
		Shelf() { type = PROTOCOL_SHELF; }
		Shelf(void*) : Protocol(PROTOCOL_SHELF) { }
		Shelf (int l_userid,int64_t l_roleid,int64_t l_sn,
			int l_price,TimeInfo l_time,int64_t l_buyerroleid,
			int64_t l_messageid,int64_t l_timestamp,int l_reserved1 = 0,
			int l_reserved2 = 0)
			 : userid(l_userid),roleid(l_roleid),sn(l_sn)
			,price(l_price),time(l_time),buyerroleid(l_buyerroleid)
			,messageid(l_messageid),timestamp(l_timestamp),reserved1(l_reserved1)
			,reserved2(l_reserved2)
		{
			type = PROTOCOL_SHELF;
		}

		Shelf(const Shelf &rhs)
			: Protocol(rhs),userid(rhs.userid),roleid(rhs.roleid),sn(rhs.sn)
			,price(rhs.price),time(rhs.time),buyerroleid(rhs.buyerroleid)
			,messageid(rhs.messageid),timestamp(rhs.timestamp),reserved1(rhs.reserved1)
			,reserved2(rhs.reserved2) { }

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

		OctetsStream& marshal(OctetsStream & os) const
		{
			os << userid;
			os << roleid;
			os << sn;
			os << price;
			os << time;
			os << buyerroleid;
			os << messageid;
			os << timestamp;
			os << reserved1;
			os << reserved2;
			return os;
		}

		const OctetsStream& unmarshal(const OctetsStream &os)
		{
			os >> userid;
			os >> roleid;
			os >> sn;
			os >> price;
			os >> time;
			os >> buyerroleid;
			os >> messageid;
			os >> timestamp;
			os >> reserved1;
			os >> reserved2;
			return os;
		}

		int PriorPolicy( ) const { return 1; }

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