Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static const int PROTOCOL_VERSION = 3;
- /**
- * Lists all possible commands.
- * @todo work out what commands are actually needed
- */
- enum CommandType {
- BAPS_HANDSHAKE, ///< Initialiser command.
- BAPS_NULL, ///< Null command, shouldn't be used.
- };
- /**
- * Stuff to send.
- * @todo think of better documentation for this
- */
- template <class TsendType>
- class Command {
- CommandType cmd_type;
- TsendType to_send;
- /* Psuedocode */
- bool Send()
- {
- sendbytes(PROTOCOLVERSION);
- sendbytes(cmd_type);
- sendbytes(sizeof(to_send));
- sendbytes(to_send);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement