00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __XPSTREAM_H__
00012 #define __XPSTREAM_H__
00013
00014 #include "XPSocketClass.h"
00015
00016 namespace RNReplicaNet
00017 {
00018
00026 class XPStream : public XPSocket
00027 {
00028 public:
00033 XPStream();
00034
00039 virtual ~XPStream();
00040
00045 int Create();
00046
00051 int Close();
00052
00057 XPStream *Accept(void);
00058
00065 int Send(const char *data,const int len);
00066
00073 int Recv(char *const data,const int maxlen);
00074
00079 int GetMaxPacketSize(void) {return XPSOCK_MAXPACKETSIZE-2;};
00080
00081 private:
00082 char *mTempBuffer;
00083 char *mBuffer;
00084 int mPacketBlocks;
00085 int mBufferEndPoint;
00086 int mBufferStartPoint;
00087 int mBufferSize;
00088 };
00089
00090 }
00091
00092 #endif