Ace_Buffer_Append()

Abstract

Appends data to a specified buffer.

Syntax

Ace_Buffer_Append (buffer_ptr, data, data_len)
Argument Type Description
buffer_ptr AceT_Buffer * Buffer to receive appended data.
data void * Data to append to the specified buffer.
data_len int Amount of data to append, in bytes.

Return Type

PrgT_Compcode

PrgC_Compcode_Success if the data is successfully appended; PrgC_Compcode_Failure otherwise.

ace_client_api.h

Example

if (last_byte_index >= first_byte_index)
	{
	// one contiguous section
	Ace_Buffer_Append (buffer_ptr, historyBuffer + first_byte_index,
		last_byte_index - first_byte_index + 1);
	processed_bytes = (unsigned char *) Ace_Buffer_Data_Get (buffer_ptr,
		&num_processed_bytes);
	}
else if (last_byte_index == first_byte_index - 1)
	{
	// no decompressed data
	processed_bytes = PRGC_NIL;
	num_processed_bytes = 0;
	}
else
	{
	// two sections
	Ace_Buffer_Append (buffer_ptr, historyBuffer + first_byte_index,
		bufferLen - first_byte_index);
	Ace_Buffer_Append (buffer_ptr, historyBuffer, last_byte_index + 1);
	processed_bytes = (unsigned char *) Ace_Buffer_Data_Get (buffer_ptr,
		&num_processed_bytes);
	}

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com