@@ -196,47 +196,6 @@ void http_response::decorate_response_deferred(MHD_Response* response)
196196 static_cast <http_response*>(this )->decorate_response (response);
197197}
198198
199- void http_response::get_raw_response_lp_receive (
200- MHD_Response** response,
201- webserver* ws
202- )
203- {
204- this ->ws = ws;
205- this ->connection_id = this ->underlying_connection ;
206-
207- *response = MHD_create_response_from_callback (MHD_SIZE_UNKNOWN , 80 ,
208- &http_response::data_generator, (void *) this , NULL );
209-
210- ws->register_to_topics (
211- topics,
212- connection_id
213- );
214- }
215-
216- ssize_t http_response::data_generator (
217- void * cls,
218- uint64_t pos,
219- char * buf,
220- size_t max
221- )
222- {
223- http_response* _this = static_cast <http_response*>(cls);
224-
225- string message;
226- size_t size = _this->ws ->read_message (_this->connection_id , message);
227- memcpy (buf, message.c_str (), size);
228- return size;
229- }
230-
231- void http_response::get_raw_response_lp_send (
232- MHD_Response** response,
233- webserver* ws
234- )
235- {
236- http_response::get_raw_response_str (response, ws);
237- ws->send_message_to_topic (send_topic, content);
238- }
239-
240199std::ostream &operator << (std::ostream &os, const http_response &r)
241200{
242201 os << " Response [response_code:" << r.response_code << " ]" << std::endl;
@@ -248,5 +207,4 @@ std::ostream &operator<< (std::ostream &os, const http_response &r)
248207 return os;
249208}
250209
251-
252210};
0 commit comments