![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
00001 00002 00003 00004 00005 00006 00007 00008 #include "NativeFeatureIncludes.h" 00009 #if _RAKNET_SUPPORT_TelnetTransport==1 00010 00011 #ifndef __RAKNET_TRANSPORT_2 00012 #define __RAKNET_TRANSPORT_2 00013 00014 #include "TransportInterface.h" 00015 #include "DS_Queue.h" 00016 #include "CommandParserInterface.h" 00017 #include "PluginInterface2.h" 00018 #include "Export.h" 00019 00020 namespace RakNet 00021 { 00023 class BitStream; 00024 class RakPeerInterface; 00025 class RakNetTransport; 00026 00031 00036 class RAK_DLL_EXPORT RakNetTransport2 : public TransportInterface, public PluginInterface2 00037 { 00038 public: 00039 // GetInstance() and DestroyInstance(instance*) 00040 STATIC_FACTORY_DECLARATIONS(RakNetTransport2) 00041 00042 RakNetTransport2(); 00043 virtual ~RakNetTransport2(); 00044 00049 bool Start(unsigned short port, bool serverMode); 00050 00052 void Stop(void); 00053 00060 void Send( SystemAddress systemAddress, const char *data, ... ); 00061 00064 void CloseConnection( SystemAddress systemAddress ); 00065 00071 Packet* Receive( void ); 00072 00075 void DeallocatePacket( Packet *packet ); 00076 00079 SystemAddress HasNewIncomingConnection(void); 00080 00083 SystemAddress HasLostConnection(void); 00084 00085 virtual CommandParserInterface* GetCommandParser(void) {return 0;} 00086 00088 virtual PluginReceiveResult OnReceive(Packet *packet); 00090 virtual void OnClosedConnection(const SystemAddress &systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason ); 00092 virtual void OnNewConnection(const SystemAddress &systemAddress, RakNetGUID rakNetGUID, bool isIncoming); 00093 protected: 00094 DataStructures::Queue<SystemAddress> newConnections, lostConnections; 00095 DataStructures::Queue<Packet*> packetQueue; 00096 }; 00097 00098 } // namespace RakNet 00099 00100 #endif 00101 00102 #endif // _RAKNET_SUPPORT_*
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.