All pastes #30565 Raw Edit

BasePacket

public text v1 · immutable
#30565 ·published 2005-11-23 14:35 UTC
rendered paste body
#include "stdafx.h"

class BasePacket
{
private:
	char *_buffer;
	int _size;
	int offset;
	
public:
	BasePacket(char *buffer,int size):_buffer(buffer),_size(size),offset(0)
	{
	}

	void run() {}

	unsigned char readByte()
	{
		return _buffer[offset++];
	}

	char readByte()
	{
		return _buffer[offset++];
	}

};