A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/http__proto_8cpp_source.html below:

NCBI C++ ToolKit: src/app/pubseq_gateway/server/http_proto.cpp Source File

52  ssize_t

limit = app->Settings().m_ShutdownIfTooManyOpenFD;

58  int

proc_fd_soft_limit;

59  int

proc_fd_hard_limit;

64  if

(proc_fd_used < limit)

67  #if H2O_VERSION_MAJOR == 2 && H2O_VERSION_MINOR >= 3 71  ERR_POST

(

Fatal

<<

"The file descriptor usage limit has reached. Currently in use: "

+

72

to_string(proc_fd_used) +

" Limit: "

+ to_string(limit) +

73  " Exit immediately."

);

77  PSG_CRITICAL

(

"The file descriptor usage limit has reached. Currently in use: "

+

78

to_string(proc_fd_used) +

" Limit: "

+ to_string(limit));

81  auto

now = psg_clock_t::now();

82  auto

expiration = now + chrono::seconds(2);

92  PSG_CRITICAL

(

"Auto shutdown within 2 seconds is initiated."

);

99 #if H2O_VERSION_MAJOR == 2 && H2O_VERSION_MINOR >= 3 100  #include <h2o/http2_internal.h> 101

h2o_socket_t * Geth2oConnectionSocketForRequest(h2o_req_t * req)

110

h2o_http2_conn_t * conn_http2 = (h2o_http2_conn_t * )req->conn;

111  return

conn_http2->sock;

130

uv_close_cb close_cb)

133  #if H2O_VERSION_MAJOR == 2 && H2O_VERSION_MINOR >= 3 134

h2o_socket_t * sock = h2o_uv_socket_create((uv_handle_t*)

conn

, close_cb);

136

h2o_socket_t * sock = h2o_uv_socket_create(

conn

, close_cb);

140  PSG_ERROR

(

"h2o layer failed to create socket"

);

141

uv_close((uv_handle_t*)

conn

, close_cb);

150  if

(uv_fileno(

reinterpret_cast<

uv_handle_t*

>

(

conn

), &fd) == 0) {

152  struct

linger linger = {0, 0};

155

setsockopt(fd, IPPROTO_TCP, TCP_LINGER2, &no,

157

setsockopt(fd, SOL_SOCKET, SO_LINGER, &linger,

159

setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &keepalive,

163

sock->on_close.data = http_conn;

187  for

(

auto

& it: lst) {

189

std::get<1>(it).OnTimer();

197  for

(

auto

& it: lst) {

198

std::get<1>(it).PeekAsync(

true

);

207

reply->PrepareReplyMessage(

msg

,

213

reply->SetCompleted();

221

h2o_conn_t *

conn

= req->conn;

222  #if H2O_VERSION_MAJOR == 2 && H2O_VERSION_MINOR >= 3 223

h2o_socket_t * sock = Geth2oConnectionSocketForRequest(req);

225

h2o_socket_t * sock =

conn

->callbacks->get_socket(

conn

);

228  assert

(sock->on_close.data !=

nullptr

);

235

unique_ptr<CHttpReply> low_level_reply(

238

shared_ptr<CPSGS_Reply> reply(

new CPSGS_Reply

(std::move(low_level_reply)));

249  switch

(reply->GetHttpReply()->GetState()) {

260  string msg

=

"Logic error: unknown CHttpReply state ("

+

261

to_string(

static_cast<int>

(reply->GetHttpReply()->GetState()))

267

}

catch

(

const

std::exception & e) {

271  PSG_ERROR

(

"Exception while invoking an http request handler: "

<< e);

272  if

(!reply->IsFinished()) {

279  PSG_ERROR

(

"Unknown exception while invoking an http request handler"

);

280  if

(!reply->IsFinished()) {

void OnClientClosedConnection(void)

static void s_OnBeforeClosedConnection(void *data)

h2o_context_t * InitializeH2oHttpContext(uv_loop_t *loop, CHttpDaemon &http_daemon, h2o_socket_t *sock)

void OnAsyncWork(bool cancel)

int OnHttpRequest(CHttpGateHandler *rh, h2o_req_t *req, const char *cd_uid)

void ThreadStart(uv_loop_t *loop, CTcpWorker *worker)

void OnClientClosedConnection(uv_stream_t *conn, CHttpConnection *http_conn)

void OnNewConnection(uv_stream_t *conn, CHttpConnection *http_conn, uv_close_cb close_cb)

void SetPostParser(CHttpPostParser *parser)

void SetGetParser(CHttpRequestParser *parser)

static CPubseqGatewayApp * GetInstance(void)

static CS_CONNECTION * conn

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

@ eDiag_Error

Error message.

@ e503_ServiceUnavailable

void Fatal(CExceptionArgs_Base &args)

static int GetFileDescriptorsCount(int *soft_limit=NULL, int *hard_limit=NULL)

Get the number of file descriptors consumed by the current process, and optional system wide file des...

SShutdownData g_ShutdownData

static void FinishReply503(shared_ptr< CPSGS_Reply > reply, const string &msg)

Defines process management classes.

#define PSG_ERROR(message)

#define PSG_CRITICAL(message)

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

CHttpPostParser * m_PostParser

CHttpRequestParser * m_GetParser

HttpHandlerFunction_t * m_Handler

std::list< std::tuple< uv_tcp_t, CHttpConnection > > & GetConnList(void)

atomic_bool m_ShutdownRequested

psg_time_point_t m_Expired


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4