src/Network/Channel.hh
changeset 432 82b0f4e55a13
parent 431 c6d7272a164b
equal deleted inserted replaced
431:c6d7272a164b 432:82b0f4e55a13
     1 #ifndef NETWORK_CHANNEL_HH
     1 #ifndef NETWORK_CHANNEL_HH
     2 #define NETWORK_CHANNEL_HH
     2 #define NETWORK_CHANNEL_HH
     3 
     3 
       
     4 #include "Packet.hh"
     4 #include "../Types.hh"
     5 #include "../Types.hh"
     5 
     6 
     6 /**
     7 /**
     7  * A NetworkSession puts each packet onto a specific channel, which can the be used to run multiple different modules
     8  * A NetworkSession puts each packet onto a specific channel, which can the be used to run multiple different modules
     8  * on top of a single session.
     9  * on top of a single session.
     9  *
    10  *
    10  * NetworkChannelID zero is reserved for internal NetworkSession use
    11  * NetworkChannelID zero is reserved for internal NetworkSession use
    11  */
    12  */
    12 typedef uint16_t NetworkChannelID;
    13 typedef uint16_t NetworkChannelID;
    13 
    14 
       
    15 /**
       
    16  * NetworkPackets that are sent over a NetworkChannel with the proper headers
       
    17  *
       
    18  * XXX: use of NetworkPacket is bad
       
    19  */
       
    20 class NetworkChannelPacket : public NetworkPacket {
       
    21     public:
       
    22         /**
       
    23          * Initialize the packet by writing out the appropriate NetworkSession headers
       
    24          */
       
    25         NetworkChannelPacket (NetworkChannelID channel_id);
       
    26 };
    14 
    27 
    15 #endif /* NETWORK_CHANNEL_HH */
    28 #endif /* NETWORK_CHANNEL_HH */