src/Network/Channel.hh
author nireco
Sat, 31 Jan 2009 12:33:08 +0200
changeset 443 5d1119729f58
parent 432 82b0f4e55a13
permissions -rw-r--r--
worm02 two pics to comment
#ifndef NETWORK_CHANNEL_HH
#define NETWORK_CHANNEL_HH

#include "Packet.hh"
#include "../Types.hh"

/**
 * A NetworkSession puts each packet onto a specific channel, which can the be used to run multiple different modules
 * on top of a single session.
 *
 * NetworkChannelID zero is reserved for internal NetworkSession use
 */
typedef uint16_t NetworkChannelID;

/**
 * NetworkPackets that are sent over a NetworkChannel with the proper headers
 *
 * XXX: use of NetworkPacket is bad
 */
class NetworkChannelPacket : public NetworkPacket {
    public:
        /**
         * Initialize the packet by writing out the appropriate NetworkSession headers
         */
        NetworkChannelPacket (NetworkChannelID channel_id);
};

#endif /* NETWORK_CHANNEL_HH */