1 #ifndef MSP_HTTP_SERVER_H_
2 #define MSP_HTTP_SERVER_H_
4 #include <msp/core/refptr.h>
5 #include <msp/io/eventdispatcher.h>
6 #include <msp/net/streamserversocket.h>
17 sigc::signal<void, const Request &, Response &> signal_request;
22 RefPtr<Net::StreamSocket> sock;
29 Client(RefPtr<Net::StreamSocket>);
33 Net::StreamServerSocket sock;
34 std::list<Client> clients;
35 std::map<Response *, Client *> responses;
36 IO::EventDispatcher *event_disp;
40 unsigned get_port() const;
41 void use_event_dispatcher(IO::EventDispatcher *);
42 void delay_response(Response &);
43 void submit_response(Response &);
45 void data_available();
46 void client_data_available(Client &);
47 void client_end_of_file(Client &);
48 Client &get_client_by_response(Response &);