2013-05-05 18:18:41 +02:00
|
|
|
#ifndef _XFX_NET_PACKETREADER_
|
|
|
|
#define _XFX_NET_PACKETREADER_
|
|
|
|
|
|
|
|
#include <System/IO/BinaryReader.h>
|
|
|
|
|
|
|
|
using namespace System::IO;
|
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
{
|
|
|
|
struct Matrix;
|
|
|
|
struct Quaternion;
|
|
|
|
struct Vector2;
|
|
|
|
struct Vector3;
|
|
|
|
struct Vector4;
|
|
|
|
|
|
|
|
namespace Net
|
|
|
|
{
|
2014-03-29 16:17:59 +01:00
|
|
|
/**
|
|
|
|
* Provides common functionality for efficiently reading incoming network packets.
|
|
|
|
*/
|
|
|
|
class PacketReader : public BinaryReader
|
2013-05-05 18:18:41 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
int Length();
|
2013-05-30 13:55:10 +02:00
|
|
|
int getPosition();
|
|
|
|
void setPosition(int newValue);
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
PacketReader();
|
|
|
|
PacketReader(int capacity);
|
|
|
|
|
|
|
|
Matrix ReadMatrix();
|
|
|
|
Quaternion ReadQuaternion();
|
|
|
|
Vector2 ReadVector2();
|
|
|
|
Vector3 ReadVector3();
|
2013-05-30 13:55:10 +02:00
|
|
|
Vector4 ReadVector4();
|
2013-05-05 18:18:41 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_XFX_NET_PACKETREADER_
|