00001 00002 00003 00004 00005 00006 00007 00008 00009 #ifndef __TRANSPORT_INTERFACE_H 00010 #define __TRANSPORT_INTERFACE_H 00011 00012 #include "RakNetTypes.h" 00013 #include "Export.h" 00014 #include "RakMemoryOverride.h" 00015 00016 #define REMOTE_MAX_TEXT_INPUT 2048 00017 00018 class CommandParserInterface; 00019 00022 class RAK_DLL_EXPORT TransportInterface 00023 { 00024 public: 00025 TransportInterface() {} 00026 virtual ~TransportInterface() {} 00027 00032 virtual bool Start(unsigned short port, bool serverMode)=0; 00033 00035 virtual void Stop(void)=0; 00036 00043 virtual void Send( SystemAddress systemAddress, const char *data, ... )=0; 00044 00047 virtual void CloseConnection( SystemAddress systemAddress )=0; 00048 00054 virtual Packet* Receive( void )=0; 00055 00058 virtual void DeallocatePacket( Packet *packet )=0; 00059 00062 virtual SystemAddress HasNewIncomingConnection(void)=0; 00063 00066 virtual SystemAddress HasLostConnection(void)=0; 00067 00072 virtual CommandParserInterface* GetCommandParser(void)=0; 00073 protected: 00074 }; 00075 00076 #endif 00077