Example #1
0
void OutPacketBuffer::skipBytes(unsigned numBytes) {
  if (numBytes > totalBytesAvailable()) {
    numBytes = totalBytesAvailable();
  }

  increment(numBytes);
}
void COutBuffer::enqueue(unsigned char const* from, unsigned numBytes)
{
	if (numBytes > totalBytesAvailable()) 
	{
		numBytes = totalBytesAvailable();
	}

	if (curPtr() != from) 
		memmove(curPtr(), from, numBytes);
	increment(numBytes);
}
Example #3
0
void OutPacketBuffer::enqueue(unsigned char const* from, unsigned numBytes) {
  if (numBytes > totalBytesAvailable()) {
#ifdef DEBUG
    fprintf(stderr, "OutPacketBuffer::enqueue() warning: %d > %d\n", numBytes, totalBytesAvailable());
#endif
    numBytes = totalBytesAvailable();
  }

  if (curPtr() != from) memmove(curPtr(), from, numBytes);
  increment(numBytes);
}