TurtleBrains  0.3.1
High quality, portable, C++ framework for rapid 2D game development.
tb_packet_handler_interface.h
1 
9 #ifndef _TurtleBrains_PacketHandlerInterface_h_
10 #define _TurtleBrains_PacketHandlerInterface_h_
11 
12 #include "../../core/tb_configuration.h"
13 #if defined(tb_with_networking)
14 
15 #include "../../core/tb_types.h"
16 
17 namespace tbImplementation { class SocketConnectionImplementation; };
18 
19 namespace TurtleBrains
20 {
21  namespace Network
22  {
23  namespace Unstable
24  {
26 
27  class PacketHandlerInterface
28  {
29  public:
30  PacketHandlerInterface(void);
31  virtual ~PacketHandlerInterface(void);
32 
33  protected:
34  virtual bool OnHandlePacket(const tbCore::byte* packetData, size_t packetSize, tbCore::byte from) = 0;
35 
36  private:
37  friend class tbImplementation::SocketConnectionImplementation;
38  };
39 
41  }; /* namespace Unstable */
42  }; /* namespace Network */
43 }; /* namespace TurtleBrains */
44 
46 
47 #endif /* tb_with_networking */
48 #endif /* _TurtleBrains_PacketHandlerInterface_h_ */
Here is some information about the primary namespace.
Definition: tb_application_dialog.h:21
uint8 byte
Unsigned integer with 8 bits (1 byte). Supports 256 values from 0 to 255.
Definition: tb_types.h:24
Definition: tb_http_request.h:27
Definition: tb_application_dialog.h:19