• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

RakNetTransport2.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 #ifndef __RAKNET_TRANSPORT_2
00010 #define __RAKNET_TRANSPORT_2
00011 
00012 #include "TransportInterface.h"
00013 #include "DS_Queue.h"
00014 #include "CommandParserInterface.h"
00015 #include "PluginInterface2.h"
00016 #include "Export.h"
00017 
00018 class RakPeerInterface;
00019 class RakNetTransport;
00020 namespace RakNet
00021 {
00022         class BitStream;
00023 }
00024 
00029 
00034 class RAK_DLL_EXPORT RakNetTransport2 : public TransportInterface, public PluginInterface2
00035 {
00036 public:
00037         RakNetTransport2();
00038     virtual ~RakNetTransport2();
00039 
00044         bool Start(unsigned short port, bool serverMode);
00045 
00047         void Stop(void);
00048 
00055         void Send( SystemAddress systemAddress, const char *data, ... );
00056 
00059         void CloseConnection( SystemAddress systemAddress );
00060 
00066         Packet* Receive( void );
00067 
00070         void DeallocatePacket( Packet *packet );
00071 
00074         SystemAddress HasNewIncomingConnection(void);
00075 
00078         SystemAddress HasLostConnection(void);
00079 
00080         virtual CommandParserInterface* GetCommandParser(void) {return 0;}
00081 
00083         virtual PluginReceiveResult OnReceive(Packet *packet);
00085         virtual void OnClosedConnection(SystemAddress systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason );
00087         virtual void OnNewConnection(SystemAddress systemAddress, RakNetGUID rakNetGUID, bool isIncoming);
00088 protected:
00089         DataStructures::Queue<SystemAddress> newConnections, lostConnections;
00090         DataStructures::Queue<Packet*> packetQueue;
00091 };
00092 
00093 #endif

Generated on Thu Sep 30 2010 01:27:26 for RakNet by  doxygen 1.7.1