comparison Core/HttpServer/MongooseServer.cpp @ 909:ef71057d8b26 plugins

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 20 Jun 2014 13:30:53 +0200
parents e078ea944089
children 306afd58a0b3
comparison
equal deleted inserted replaced
908:e078ea944089 909:ef71057d8b26
72 { 72 {
73 private: 73 private:
74 struct mg_connection* connection_; 74 struct mg_connection* connection_;
75 75
76 protected: 76 protected:
77 virtual void SendBody(const void* buffer, size_t length) 77 virtual void Send(bool isHeader, const void* buffer, size_t length)
78 { 78 {
79 if (length > 0) 79 if (length > 0)
80 { 80 {
81 mg_write(connection_, buffer, length); 81 mg_write(connection_, buffer, length);
82 } 82 }
83 }
84
85 virtual void SendHeader(const void* buffer, size_t length)
86 {
87 SendBody(buffer, length);
88 } 83 }
89 84
90 public: 85 public:
91 MongooseOutputStream(struct mg_connection* connection) : connection_(connection) 86 MongooseOutputStream(struct mg_connection* connection) : connection_(connection)
92 { 87 {