task() API, documentation work
This commit is contained in:
@@ -53,6 +53,7 @@ FastCGIServer::RequestInfo::RequestInfo() :
|
||||
in_closed(false),
|
||||
output_closed(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +72,7 @@ FastCGIServer::FastCGIServer()
|
||||
|
||||
FastCGIServer::~FastCGIServer()
|
||||
{
|
||||
|
||||
if(my_pid != parent_pid) // if we're a child process, we must not close the handles
|
||||
return;
|
||||
|
||||
@@ -214,6 +216,7 @@ FastCGIServer::process(int timeout_ms)
|
||||
if (posix_con == -1)
|
||||
throw std::runtime_error("accept() failed");
|
||||
read_sockets[posix_con] = new Connection();
|
||||
read_sockets[posix_con]->posix_con = posix_con;
|
||||
}
|
||||
|
||||
for (std::map<int, Connection*>::iterator it = read_sockets.begin();
|
||||
@@ -377,6 +380,7 @@ FastCGIServer::process_connection_read(Connection& connection)
|
||||
request_arena->clear();
|
||||
switch_to_arena(request_arena);
|
||||
RequestInfo* new_request = new RequestInfo();
|
||||
new_request->resources.fcgi_socket = connection.posix_con;
|
||||
new_request->mem = request_arena;
|
||||
new_request->stats.time_init = microtime();
|
||||
switch_to_system_alloc();
|
||||
|
||||
@@ -77,6 +77,7 @@ protected:
|
||||
Connection();
|
||||
|
||||
RequestList requests;
|
||||
u64 posix_con = 0;
|
||||
std::string input_buffer;
|
||||
std::string output_buffer;
|
||||
bool close_responsibility;
|
||||
|
||||
Reference in New Issue
Block a user