]> git.tdb.fi Git - libs/net.git/blobdiff - source/http/message.h
Add a dynamic receiver class for more flexible packet handling
[libs/net.git] / source / http / message.h
index 7acce90d146dffa356adb885ba0449c13e4c6b9e..be2224d88af4480704bd1d610e3455d14ad6218b 100644 (file)
@@ -4,24 +4,25 @@
 #include <map>
 #include <string>
 #include <msp/core/variant.h>
+#include <msp/net/mspnet_api.h>
 #include "version.h"
 
 namespace Msp {
 namespace Http {
 
-class Message
+class MSPNET_API Message
 {
 protected:
        typedef std::map<std::string, std::string> HeaderMap;
 
-       Version http_version;
+       Version http_version = 0x11;
        HeaderMap headers;
        std::string content;
-       std::string::size_type chunk_length;
-       bool complete;
+       std::string::size_type chunk_length = 0;
+       bool complete = false;
        Variant user_data;
 
-       Message();
+       Message() = default;
 public:
        virtual ~Message() = default;