NCBI C++ ToolKit
http_reply.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef HTTP_REPLY__HPP
2 #define HTTP_REPLY__HPP
3 
4 /* $Id: http_reply.hpp 103123 2024-09-11 18:57:02Z satskyse $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Dmitri Dmitrienko
30  *
31  * File Description:
32  *
33  */
34 
35 #include <atomic>
36 
37 #include "pending_operation.hpp"
39 
40 
41 static const char * k_ReasonOK = "OK";
42 static const char * k_ReasonAccepted = "Accepted";
43 static const char * k_InternalServerError = "Internal Server Error";
44 static const char * k_BadGateway = "Bad Gateway";
45 static const char * k_ServiceUnavailable = "Service Unavailable";
46 static const char * k_Conflict = "Conflict";
47 static const char * k_NotFound = "Not Found";
48 static const char * k_Unauthorized = "Unauthorized";
49 static const char * k_BadRequest = "Bad Request";
50 
51 void OnLibh2oFinished(size_t request_id);
52 
53 class CHttpProto;
54 class CHttpConnection;
55 
56 
58 {
59  h2o_generator_t m_Generator;
60  size_t m_RequestId;
61  void * m_HttpReply;
62 
64  m_RequestId(0),
66  {
67  m_Generator.stop = nullptr;
68  m_Generator.proceed = nullptr;
69  }
70 };
71 
73 {
74 public:
75  enum EReplyState {
79  };
80 
81  CHttpReply(h2o_req_t * req,
82  CHttpProto * proto,
83  CHttpConnection * http_conn,
84  const char * cd_uid) :
85  m_Req(req),
87  m_RequestId(0),
94  m_HttpProto(proto),
95  m_HttpConn(http_conn),
96  m_DataReady(make_shared<CDataTrigger>(proto)),
98  m_CdUid(cd_uid)
99  {}
100 
101 
102  CHttpReply(const CHttpReply&) = delete;
103  CHttpReply(CHttpReply&&) = delete;
104  CHttpReply& operator=(const CHttpReply&) = delete;
106 
108  {
109  PSG_TRACE("~CHttpReply");
110  x_Clear();
111  }
112 
113  void AssignPendingReq(unique_ptr<CPendingOperation> pending_req)
114  {
115  m_PendingReqs.emplace_back(std::move(pending_req));
116  }
117 
118  // The method is used only when the reply is finished.
119  // See the comments at the point of invocation.
121  {
122  for (auto req: m_PendingReqs) {
123  req = nullptr;
124  }
125  m_PendingReqs.clear();
126  }
127 
128  void SetContentLength(uint64_t content_length)
129  {
130  if (m_State == eReplyInitialized) {
131  m_Req->res.content_length = content_length;
132  } else {
133  NCBI_THROW(CPubseqGatewayException, eReplyAlreadyStarted,
134  "Reply has already started");
135  }
136  }
137 
138  void SetRequestId(size_t request_id)
139  {
140  m_RequestId = request_id;
141  }
142 
144  {
145  m_ReplyContentType = mime_type;
146  }
147 
148  size_t GetBytesSent(void) const
149  {
150  if (m_Req)
151  return m_Req->bytes_sent;
152  return 0;
153  }
154 
155  void Send(const char * payload, size_t payload_len,
156  bool is_persist, bool is_last)
157  {
158  if (payload_len == 0) {
159  if (is_last) {
160  // If it is not the last and there is nothing to send then the
161  // call will do nothing
162  x_DoSend(nullptr, 0, true);
163  }
164  } else {
165  h2o_iovec_t body;
166  if (is_persist) {
167  body.base = (char*)payload;
168  body.len = payload_len;
169  } else {
170  body = h2o_strdup(&m_Req->pool, payload, payload_len);
171  }
172  x_DoSend(&body, payload_len > 0 ? 1 : 0, is_last);
173  }
174  }
175 
176  void Send(std::vector<h2o_iovec_t> & payload, bool is_last)
177  {
178  size_t payload_size = payload.size();
179  if (payload_size > 0 || is_last) {
180  if (payload_size > 0)
181  x_DoSend(&payload.front(), payload_size, is_last);
182  else
183  x_DoSend(nullptr, payload_size, is_last);
184  }
185  }
186 
188  {
190  }
191 
192  void SendOk(const char * payload, size_t payload_len, bool is_persist)
193  { Send(payload, payload_len, is_persist, true); }
194 
195  void Send202(const char * payload, size_t payload_len)
196  {
197  h2o_iovec_t body = h2o_strdup(&m_Req->pool, payload, payload_len);
198  x_DoSend(&body, 1, true, 202, k_ReasonAccepted);
199  }
200 
201  void Send400(const char * payload)
202  { x_GenericSendError(400, k_BadRequest, payload); }
203 
204  void Send401(const char * payload)
205  { x_GenericSendError(401, k_Unauthorized, payload); }
206 
207  void Send404(const char * payload)
208  { x_GenericSendError(404, k_NotFound, payload); }
209 
210  void Send409(const char * payload)
211  { x_GenericSendError(409, k_Conflict, payload); }
212 
213  void Send500(const char * payload)
214  { x_GenericSendError(500, k_InternalServerError, payload); }
215 
216  void Send502(const char * payload)
217  { x_GenericSendError(502, k_BadGateway, payload); }
218 
219  void Send503(const char * payload)
220  { x_GenericSendError(503, k_ServiceUnavailable, payload); }
221 
223  { return m_HttpConn; }
224 
225  void PeekPending(void)
226  {
227  try {
228  if (!m_Postponed)
229  NCBI_THROW(CPubseqGatewayException, eRequestNotPostponed,
230  "Request has not been postponed");
231  for (auto req: m_PendingReqs) {
232  req->Peek(true);
233  }
234  } catch (const std::exception & e) {
235  Error(e.what());
236  } catch (...) {
237  Error("unexpected failure");
238  }
239  }
240 
241  void CancelPending(bool from_flush=false)
242  {
243  if (!from_flush) {
244  if (!m_Postponed)
245  NCBI_THROW(CPubseqGatewayException, eRequestNotPostponed,
246  "Request has not been postponed");
247  }
248  x_DoCancel();
249  }
250 
251  EReplyState GetState(void) const
252  { return m_State; }
253 
254  bool IsFinished(void) const
255  { return m_State >= eReplyFinished; }
256 
257  bool IsOutputReady(void) const
258  { return m_OutputIsReady; }
259 
260  bool IsPostponed(void) const
261  { return m_Postponed; }
262 
263  bool IsClosed(void) const;
264 
265  bool IsCompleted(void) const
266  { return m_Completed; }
267 
268  void SetCompleted(void);
269 
270  void SetPostponed(void)
271  { m_Postponed = true; }
272 
273  list<shared_ptr<CPendingOperation>> & GetPendingReqs(void)
274  {
275  if (m_PendingReqs.empty())
276  NCBI_THROW(CPubseqGatewayException, ePendingReqNotAssigned,
277  "There are no assigned pending requests");
278  return m_PendingReqs;
279  }
280 
281  h2o_iovec_t PrepareChunk(const unsigned char * data, unsigned int size)
282  {
283  if (m_Req)
284  return h2o_strdup(&m_Req->pool,
285  reinterpret_cast<const char*>(data), size);
286 
287  NCBI_THROW(CPubseqGatewayException, eRequestPoolNotAvailable,
288  "Request pool is not available");
289  }
290 
292  { return m_DataReady->CheckResetTriggered(); }
293 
294  void Error(const char * what)
295  {
296  switch (m_State) {
297  case eReplyInitialized:
299  break;
300  case eReplyStarted:
301  Send(nullptr, 0, true, true); // break
302  break;
303  default:;
304  }
305  CancelPending();
306  }
307 
308  shared_ptr<CCassDataCallbackReceiver> GetDataReadyCB(void)
309  { return static_pointer_cast<CCassDataCallbackReceiver>(m_DataReady); }
310 
311  bool GetExceedSoftLimitFlag(void) const;
312 
313 private:
315  {
316  public:
317  CDataTrigger(const CDataTrigger & from) = delete;
318  CDataTrigger & operator=(const CDataTrigger & from) = delete;
319  CDataTrigger(CDataTrigger && from) = delete;
320  CDataTrigger & operator=(CDataTrigger && from) = delete;
321 
324  m_Proto(proto)
325  {}
326 
327  virtual void OnData() override;
328 
330  {
331  bool b = true;
332  return m_Triggered.compare_exchange_weak(b, false);
333  }
334 
335  private:
336  std::atomic<bool> m_Triggered;
338  };
339 
340  void AssignGenerator(void)
341  {
342  if (m_RespGenerator != nullptr) {
343  PSG_ERROR("A responce generator is created more than once "
344  "for an http reply. Request ID: " << m_RequestId);
345  }
346 
347  // The memory will be freed by libh2o
349  h2o_mem_alloc_shared(&m_Req->pool,
350  sizeof(SRespGenerator),
355  m_RespGenerator->m_HttpReply = (void *)(this);
356  }
357 
358  void NeedOutput(void);
359 
360  // Called by HTTP daemon when there is no way to send any further data
361  // using this connection
362  void StopCB(void)
363  {
364  PSG_TRACE("CHttpReply::Stop");
365  m_OutputIsReady = true;
366  m_OutputFinished = true;
367  if (m_State != eReplyFinished) {
368  PSG_TRACE("CHttpReply::Stop: need cancel");
369  x_DoCancel();
370  NeedOutput();
371  }
372 
373  if (m_RespGenerator != nullptr) {
374  m_RespGenerator->m_Generator.stop = nullptr;
375  m_RespGenerator->m_Generator.proceed = nullptr;
376  }
377  m_Req = nullptr;
378  }
379 
380  // Called by HTTP daemon after data has already been sent and
381  // it is ready for the next portion
382  void ProceedCB(void)
383  {
384  PSG_TRACE("CHttpReply::Proceed");
385  m_OutputIsReady = true;
386  NeedOutput();
387  }
388 
389  static void s_StopCB(h2o_generator_t * _generator, h2o_req_t * req)
390  {
391  SRespGenerator * gen = (SRespGenerator*)(_generator);
392  CHttpReply * http_reply = (CHttpReply*)(gen->m_HttpReply);
393 
394  http_reply->StopCB();
395  }
396 
397  static void s_ProceedCB(h2o_generator_t * _generator, h2o_req_t * req)
398  {
399  SRespGenerator * gen = (SRespGenerator*)(_generator);
400  CHttpReply * http_reply = (CHttpReply*)(gen->m_HttpReply);
401 
402  http_reply->ProceedCB();
403  }
404 
405  static void s_GeneratorDisposalCB(void * gen)
406  {
407  SRespGenerator * generator = (SRespGenerator*)(gen);
408  OnLibh2oFinished(generator->m_RequestId);
409  }
410 
411  // true => OK
412  // false => No action possible
413  bool x_ConnectionPrecheck(size_t count, bool is_last);
414 
415  void x_HandleConnectionState(int status, const char * reason)
416  {
417  switch (m_State) {
418  case eReplyInitialized:
419  if (!m_Canceled) {
421  x_SetCdUid();
423  m_Req->res.status = status;
424  m_Req->res.reason = reason;
425  AssignGenerator();
426  m_OutputIsReady = false;
427  h2o_start_response(m_Req, &(m_RespGenerator->m_Generator));
428  }
429  break;
430  case eReplyStarted:
431  break;
432  case eReplyFinished:
433  NCBI_THROW(CPubseqGatewayException, eRequestAlreadyFinished,
434  "Request has already been finished");
435  break;
436  }
437  }
438 
439  void x_DoSend(h2o_iovec_t * vec, size_t count, bool is_last,
440  int status=200, const char * reason=k_ReasonOK)
441  {
442  if (!x_ConnectionPrecheck(count, is_last))
443  return;
444 
445  PSG_TRACE("x_DoSend: " << count << " chunks, "
446  "is_last: " << is_last << ", state: " << m_State);
447 
448  x_HandleConnectionState(status, reason);
449 
450  if (m_Canceled) {
452  x_SendCanceled();
453  } else {
454  m_OutputIsReady = false;
455  h2o_send(m_Req, vec, count,
456  is_last ? H2O_SEND_STATE_FINAL : H2O_SEND_STATE_IN_PROGRESS);
457  }
458 
459  if (is_last) {
461  m_OutputFinished = true;
462  }
463  }
464 
465  void x_SendPsg503(const string & msg,
467  {
468  CPSGS_Reply high_level_reply(this);
469  high_level_reply.PrepareReplyMessage(
471  err_code, eDiag_Error);
472 
473  psg_time_point_t start_timestamp;
474  if (m_PendingReqs.empty())
475  start_timestamp = psg_clock_t::now();
476  else
477  start_timestamp = m_PendingReqs.front()->GetStartTimestamp();
478 
480  start_timestamp);
481  high_level_reply.Flush(CPSGS_Reply::ePSGS_SendAndFinish);
482  high_level_reply.SetCompleted();
483  }
484 
485  void x_SendCanceled(void)
486  {
488  x_SendPsg503("Request has been canceled", ePSGS_RequestCancelled);
489  }
490  }
491 
492  void x_DoCancel(void);
493  void x_GenericSendError(int status, const char * head,
494  const char * payload);
495 
496  void x_SetContentType(void)
497  {
499  return;
500 
501  if (m_State != eReplyInitialized)
502  NCBI_THROW(CPubseqGatewayException, eReplyAlreadyStarted,
503  "Reply has already started");
504 
505  switch (m_ReplyContentType) {
506  case ePSGS_JsonMime:
507  h2o_add_header(&m_Req->pool,
508  &m_Req->res.headers,
509  H2O_TOKEN_CONTENT_TYPE, NULL,
510  H2O_STRLIT("application/json"));
511  break;
512  case ePSGS_HtmlMime:
513  h2o_add_header(&m_Req->pool,
514  &m_Req->res.headers,
515  H2O_TOKEN_CONTENT_TYPE, NULL,
516  H2O_STRLIT("text/html"));
517  break;
518  case ePSGS_BinaryMime:
519  h2o_add_header(&m_Req->pool,
520  &m_Req->res.headers,
521  H2O_TOKEN_CONTENT_TYPE, NULL,
522  H2O_STRLIT("application/octet-stream"));
523  break;
524  case ePSGS_PlainTextMime:
525  h2o_add_header(&m_Req->pool,
526  &m_Req->res.headers,
527  H2O_TOKEN_CONTENT_TYPE, NULL,
528  H2O_STRLIT("text/plain"));
529  break;
530  case ePSGS_ImageMime:
531  h2o_add_header(&m_Req->pool,
532  &m_Req->res.headers,
533  H2O_TOKEN_CONTENT_TYPE, NULL,
534  H2O_STRLIT("image/x-icon"));
535  break;
536  case ePSGS_PSGMime:
537  h2o_add_header(&m_Req->pool,
538  &m_Req->res.headers,
539  H2O_TOKEN_CONTENT_TYPE, NULL,
540  H2O_STRLIT("application/x-ncbi-psg"));
541  break;
542  default:
543  // Well, it is not good but without the content type everything
544  // will still work.
545  PSG_WARNING("Unknown content type " << m_ReplyContentType);
546  }
547  }
548 
549  void x_SetCdUid(void)
550  {
551  if (m_CdUid != nullptr) {
552  static int cd_uid_size = strlen(m_CdUid);
553  h2o_add_header_by_str(&m_Req->pool, &m_Req->res.headers,
554  H2O_STRLIT("X-CD-UID"), 0, NULL,
555  m_CdUid, cd_uid_size);
556  }
557  }
558 
559  void x_Clear(void)
560  {
561  for (auto req: m_PendingReqs) {
562  req = nullptr;
563  }
564  m_PendingReqs.clear();
565 
566  m_Req = nullptr;
567  m_OutputIsReady = true;
568  m_OutputFinished = false;
569  m_Postponed = false;
570  m_Canceled = false;
571  m_Completed = false;
573  m_HttpProto = nullptr;
574  m_HttpConn = nullptr;
576  }
577 
578  h2o_req_t * m_Req;
579 
580  // The memory is allocated in the libh2o pool. Thus there is no need to
581  // call 'delete m_RespGenerator;' in the client code.
583  size_t m_RequestId;
584 
593 
594  list<shared_ptr<CPendingOperation>> m_PendingReqs;
595 
596  shared_ptr<CDataTrigger> m_DataReady;
598  const char * m_CdUid;
599 };
600 
601 #endif
602 
void NeedOutput(void)
Definition: http_reply.cpp:169
void x_HandleConnectionState(int status, const char *reason)
Definition: http_reply.hpp:415
CHttpReply(CHttpReply &&)=delete
void x_SetContentType(void)
Definition: http_reply.hpp:496
void SetContentLength(uint64_t content_length)
Definition: http_reply.hpp:128
CHttpConnection * GetHttpConnection(void)
Definition: http_reply.hpp:222
CHttpReply(h2o_req_t *req, CHttpProto *proto, CHttpConnection *http_conn, const char *cd_uid)
Definition: http_reply.hpp:81
void Send202(const char *payload, size_t payload_len)
Definition: http_reply.hpp:195
h2o_iovec_t PrepareChunk(const unsigned char *data, unsigned int size)
Definition: http_reply.hpp:281
void SetPostponed(void)
Definition: http_reply.hpp:270
void SetCompleted(void)
Definition: http_reply.cpp:79
CHttpReply & operator=(const CHttpReply &)=delete
void AssignGenerator(void)
Definition: http_reply.hpp:340
void Send401(const char *payload)
Definition: http_reply.hpp:204
bool IsCompleted(void) const
Definition: http_reply.hpp:265
bool IsPostponed(void) const
Definition: http_reply.hpp:260
void SetRequestId(size_t request_id)
Definition: http_reply.hpp:138
void Send409(const char *payload)
Definition: http_reply.hpp:210
CHttpReply(const CHttpReply &)=delete
size_t GetBytesSent(void) const
Definition: http_reply.hpp:148
void CancelPending(bool from_flush=false)
Definition: http_reply.hpp:241
EReplyState GetState(void) const
Definition: http_reply.hpp:251
h2o_req_t * m_Req
Definition: http_reply.hpp:578
SRespGenerator * m_RespGenerator
Definition: http_reply.hpp:582
void Send404(const char *payload)
Definition: http_reply.hpp:207
CHttpConnection * m_HttpConn
Definition: http_reply.hpp:592
void x_SendPsg503(const string &msg, EPSGS_PubseqGatewayErrorCode err_code)
Definition: http_reply.hpp:465
static void s_ProceedCB(h2o_generator_t *_generator, h2o_req_t *req)
Definition: http_reply.hpp:397
CHttpReply & operator=(CHttpReply &&)=delete
CHttpProto * m_HttpProto
Definition: http_reply.hpp:591
bool m_Canceled
Definition: http_reply.hpp:588
void x_SetCdUid(void)
Definition: http_reply.hpp:549
bool m_OutputIsReady
Definition: http_reply.hpp:585
size_t m_RequestId
Definition: http_reply.hpp:583
static void s_GeneratorDisposalCB(void *gen)
Definition: http_reply.hpp:405
void x_DoSend(h2o_iovec_t *vec, size_t count, bool is_last, int status=200, const char *reason=k_ReasonOK)
Definition: http_reply.hpp:439
bool IsOutputReady(void) const
Definition: http_reply.hpp:257
void ResetPendingRequest(void)
Definition: http_reply.hpp:120
bool m_Completed
Definition: http_reply.hpp:589
bool GetExceedSoftLimitFlag(void) const
Definition: http_reply.cpp:89
bool IsFinished(void) const
Definition: http_reply.hpp:254
void x_Clear(void)
Definition: http_reply.hpp:559
void AssignPendingReq(unique_ptr< CPendingOperation > pending_req)
Definition: http_reply.hpp:113
bool CheckResetDataTriggered(void)
Definition: http_reply.hpp:291
void x_SendCanceled(void)
Definition: http_reply.hpp:485
bool m_OutputFinished
Definition: http_reply.hpp:586
void ProceedCB(void)
Definition: http_reply.hpp:382
void x_GenericSendError(int status, const char *head, const char *payload)
Definition: http_reply.cpp:110
shared_ptr< CDataTrigger > m_DataReady
Definition: http_reply.hpp:596
void Send400(const char *payload)
Definition: http_reply.hpp:201
bool IsClosed(void) const
Definition: http_reply.cpp:73
void Send502(const char *payload)
Definition: http_reply.hpp:216
shared_ptr< CCassDataCallbackReceiver > GetDataReadyCB(void)
Definition: http_reply.hpp:308
list< shared_ptr< CPendingOperation > > & GetPendingReqs(void)
Definition: http_reply.hpp:273
void SetContentType(EPSGS_ReplyMimeType mime_type)
Definition: http_reply.hpp:143
const char * m_CdUid
Definition: http_reply.hpp:598
void x_DoCancel(void)
Definition: http_reply.cpp:97
static void s_StopCB(h2o_generator_t *_generator, h2o_req_t *req)
Definition: http_reply.hpp:389
void Send503(const char *payload)
Definition: http_reply.hpp:219
void Send(std::vector< h2o_iovec_t > &payload, bool is_last)
Definition: http_reply.hpp:176
EReplyState m_State
Definition: http_reply.hpp:590
void Error(const char *what)
Definition: http_reply.hpp:294
void Send500(const char *payload)
Definition: http_reply.hpp:213
list< shared_ptr< CPendingOperation > > m_PendingReqs
Definition: http_reply.hpp:594
void StopCB(void)
Definition: http_reply.hpp:362
EPSGS_ReplyMimeType m_ReplyContentType
Definition: http_reply.hpp:597
void PeekPending(void)
Definition: http_reply.hpp:225
@ eReplyInitialized
Definition: http_reply.hpp:76
void Send(const char *payload, size_t payload_len, bool is_persist, bool is_last)
Definition: http_reply.hpp:155
bool m_Postponed
Definition: http_reply.hpp:587
void NotifyClientConnectionDrop(void)
Definition: http_reply.hpp:187
bool x_ConnectionPrecheck(size_t count, bool is_last)
Definition: http_reply.cpp:46
void SendOk(const char *payload, size_t payload_len, bool is_persist)
Definition: http_reply.hpp:192
@ ePSGS_SendAndFinish
Definition: psgs_reply.hpp:55
void PrepareReplyMessage(const string &msg, CRequestStatus::ECode status, int err_code, EDiagSev severity, bool need_update_last_activity=true)
void PrepareReplyCompletion(CRequestStatus::ECode status, const psg_time_point_t &create_timestamp)
void SetCompleted(void)
Definition: psgs_reply.cpp:87
void Flush(EPSGS_ReplyFlush how)
Definition: psgs_reply.cpp:57
#define head
Definition: ct_nlmzip_i.h:138
#define true
Definition: bool.h:35
#define false
Definition: bool.h:36
char data[12]
Definition: iconv.c:80
Uint8 uint64_t
#define NULL
Definition: ncbistd.hpp:225
@ eDiag_Error
Error message.
Definition: ncbidiag.hpp:653
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
static const char * k_Unauthorized
Definition: http_reply.hpp:48
static const char * k_Conflict
Definition: http_reply.hpp:46
static const char * k_BadGateway
Definition: http_reply.hpp:44
static const char * k_ReasonAccepted
Definition: http_reply.hpp:42
static const char * k_NotFound
Definition: http_reply.hpp:47
static const char * k_BadRequest
Definition: http_reply.hpp:49
static const char * k_ReasonOK
Definition: http_reply.hpp:41
static const char * k_ServiceUnavailable
Definition: http_reply.hpp:45
void OnLibh2oFinished(size_t request_id)
Definition: http_reply.cpp:39
static const char * k_InternalServerError
Definition: http_reply.hpp:43
const struct ncbi::grid::netcache::search::fields::SIZE size
#define nullptr
Definition: ncbimisc.hpp:45
#define count
#define PSG_ERROR(message)
#define PSG_WARNING(message)
#define PSG_TRACE(message)
@ ePSGS_JsonMime
@ ePSGS_BinaryMime
@ ePSGS_ImageMime
@ ePSGS_PlainTextMime
@ ePSGS_HtmlMime
EPSGS_PubseqGatewayErrorCode
@ ePSGS_UnknownError
@ ePSGS_RequestCancelled
psg_clock_t::time_point psg_time_point_t
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
CDataTrigger(const CDataTrigger &from)=delete
bool CheckResetTriggered(void)
Definition: http_reply.hpp:329
CDataTrigger & operator=(CDataTrigger &&from)=delete
virtual void OnData() override
Definition: http_reply.cpp:180
CDataTrigger(CHttpProto *proto)
Definition: http_reply.hpp:322
CDataTrigger(CDataTrigger &&from)=delete
CDataTrigger & operator=(const CDataTrigger &from)=delete
std::atomic< bool > m_Triggered
Definition: http_reply.hpp:336
size_t m_RequestId
Definition: http_reply.hpp:60
void * m_HttpReply
Definition: http_reply.hpp:61
h2o_generator_t m_Generator
Definition: http_reply.hpp:59
Modified on Fri Sep 20 14:57:35 2024 by modify_doxy.py rev. 669887