src/Network/Channel.hh
author nireco
Thu, 29 Jan 2009 22:23:28 +0200
changeset 442 edde3a342102
parent 432 82b0f4e55a13
permissions -rw-r--r--
couple of images about new worm
#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 */