message.h 545 B

123456789101112131415161718192021222324252627
  1. #ifndef __MESSAGE_H
  2. #define __MESSAGE_H
  3. #include <stdio.h>
  4. #include "datablock.h"
  5. #include "stringbuilder.h"
  6. #include "idisposable.h"
  7. // This is a message to send to the server.
  8. class message:public idisposable
  9. {
  10. public:
  11. datablock *buffer;
  12. datastring actual_message;
  13. message();
  14. ~message();
  15. void initialize();
  16. void setcapacity(int capacity);
  17. message &operator=(stringbuilder &item);
  18. void clear();
  19. bool set(const char *in);
  20. bool set(const char *in, int len);
  21. bool set(datastring item);
  22. message *clone();
  23. void dispose();
  24. };
  25. #endif