19 if (EV_READ & revents) {
27 std::ostringstream os;
28 os <<
"uwsgi_task: unsupported uwsgi packet: "
37 }
else if (EV_WRITE & revents) {
41 #if UWSGI_KEEPALIVE == 1
50 tdbg(
"uwsgi_task(" <<
this <<
"): exception: " << e.
what() << std::endl);
void read_data(socket &sock)
Read request data from a socket.
void write_data(socket &sock)
Write a HTTP object to a socket.
virtual void update_watcher(worker *worker)
Udate a watcher in the context of the given worker.
net::socket & socket()
Provide access to the underlying socket object.
void finish_request()
Called after a request has been responded.
uwsgi_packet_header & header()
const char * what() const noexcept
Return the error message.
void set_exception(tasks_exception &e)
Set an exception to report an error.
bool handle_event(tasks::worker *worker, int revents)
void clear()
Reset an object.
void set_events(int events)
Update the events the object monitors.
virtual bool handle_request()=0