ns-allinone-2.35/webcache/inval-agent.cc
void HttpInvalAgent::send(int realsize, AppData* data)
{
	Packet *pkt = allocpkt(data->size());
	hdr_inval *ih = hdr_inval::access(pkt);
	ih->size() = data->size();
	pkt->setdata(data);

	// Set packet size proportional to the number of invalidations
	hdr_cmn *ch = hdr_cmn::access(pkt);
	ch->size() = inval_hdr_size_ + realsize;
	Agent::send(pkt, 0);
}
// Send a list of invalidation records in user data area
// realsize: the claimed size
// datasize: the actual size of user data, used to allocate packet
Send a list of invalidation records in user data area
realsize: the claimed size
datasize: the actual size of user data, used to allocate packet
Send a list of invalidation records in user data area realsize : the claimed size datasize : the actual size of user data used to allocate packet
void HttpInvalAgent::send(int realsize, AppData* data)
{
	Packet *pkt = allocpkt(data->size());
	hdr_inval *ih = hdr_inval::access(pkt);
	ih->size() = data->size();
	pkt->setdata(data);
	hdr_cmn *ch = hdr_cmn::access(pkt);
	ch->size() = inval_hdr_size_ + realsize;
	Agent::send(pkt, 0);
}
void HttpInvalAgent :: send ( int realsize , AppData * data ) { Packet * pkt = allocpkt ( data -> size ( ) ) ; hdr_inval * ih = hdr_inval :: access ( pkt ) ; ih -> size ( ) = data -> size ( ) ; pkt -> setdata ( data ) ; hdr_cmn * ch = hdr_cmn :: access ( pkt ) ; ch -> size ( ) = inval_hdr_size_ + realsize ; Agent :: send ( pkt , 0 ) ; }
Send a list of invalidation records in user data area
realsize: the claimed size
datasize: the actual size of user data, used to allocate packet
Send a list of invalidation records in user data area realsize : the claimed size datasize : the actual size of user data used to allocate packet
// Set packet size proportional to the number of invalidations