src/Network/Channel.hh
author Tero Marttila <terom@fixme.fi>
Tue, 27 Jan 2009 00:25:58 +0200
changeset 439 9823e6cd1086
parent 432 82b0f4e55a13
permissions -rw-r--r--
some README text
#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 */