Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

XPStream.h

00001 /* START_LICENSE_HEADER
00002 
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005 
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009 
00010 END_LICENSE_HEADER */
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;};   /* Why -2 because each stream packet uses 2 bytes to describe the original length */
00080 
00081 private:
00082     char *mTempBuffer;              
00083     char *mBuffer;                  
00084     int mPacketBlocks;              
00085     int mBufferEndPoint;            
00086     int mBufferStartPoint;          
00087     int mBufferSize;                
00088 };
00089 
00090 } // namespace RNXPSockets
00091 
00092 #endif

Generated on Sun Oct 30 01:12:21 2005 for XPSockets by  doxygen 1.4.1