NCBI C++ ToolKit
|
Search Toolkit Book for SNgHttp2_Session
#include <connect/impl/ncbi_uv_nghttp2.hpp>
Public Types | |
enum | ESendResult : ssize_t { eOkay , eWantsClose } |
Public Member Functions | |
SNgHttp2_Session (void *user_data, uint32_t max_streams, nghttp2_on_data_chunk_recv_callback on_data, nghttp2_on_stream_close_callback on_stream_close, nghttp2_on_header_callback on_header, nghttp2_error_callback2 on_error, nghttp2_on_frame_recv_callback on_frame_recv=nullptr) | |
void | Del () |
int32_t | Submit (const nghttp2_nv *nva, size_t nvlen, nghttp2_data_provider *data_prd=nullptr) |
int | Resume (int32_t stream_id) |
ssize_t | Send (vector< char > &buffer) |
ssize_t | Recv (const uint8_t *buffer, size_t size) |
uint32_t | GetMaxStreams () const |
Private Member Functions | |
int | Init () |
template<typename TInt , enable_if_t< is_signed< TInt >::value, TInt > = 0> | |
TInt | x_DelOnError (TInt rv) |
Private Attributes | |
nghttp2_session * | m_Session = nullptr |
void * | m_UserData |
nghttp2_on_data_chunk_recv_callback | m_OnData |
nghttp2_on_stream_close_callback | m_OnStreamClose |
nghttp2_on_header_callback | m_OnHeader |
nghttp2_error_callback2 | m_OnError |
nghttp2_on_frame_recv_callback | m_OnFrameRecv |
pair< uint32_t, const uint32_t > | m_MaxStreams |
Definition at line 391 of file ncbi_uv_nghttp2.hpp.
Enumerator | |
---|---|
eOkay | |
eWantsClose |
Definition at line 406 of file ncbi_uv_nghttp2.hpp.
SNgHttp2_Session::SNgHttp2_Session | ( | void * | user_data, |
uint32_t | max_streams, | ||
nghttp2_on_data_chunk_recv_callback | on_data, | ||
nghttp2_on_stream_close_callback | on_stream_close, | ||
nghttp2_on_header_callback | on_header, | ||
nghttp2_error_callback2 | on_error, | ||
nghttp2_on_frame_recv_callback | on_frame_recv = nullptr |
||
) |
Definition at line 444 of file ncbi_uv_nghttp2.cpp.
References NCBI_NGHTTP2_SESSION_TRACE.
void SNgHttp2_Session::Del | ( | ) |
Definition at line 493 of file ncbi_uv_nghttp2.cpp.
References m_Session, NCBI_NGHTTP2_SESSION_TRACE, SUvNgHttp2_Error::NgHttp2Str(), and x_DelOnError().
Referenced by SUvNgHttp2_SessionBase::OnRead(), and SUvNgHttp2_SessionBase::Reset().
|
inline |
Definition at line 410 of file ncbi_uv_nghttp2.hpp.
References m_MaxStreams.
Referenced by SH2S_Session::IsFull(), and SPSG_IoSession::IsFull().
|
private |
Definition at line 461 of file ncbi_uv_nghttp2.cpp.
References m_MaxStreams, m_OnData, m_OnError, m_OnFrameRecv, m_OnHeader, m_OnStreamClose, m_Session, m_UserData, min(), NCBI_NGHTTP2_SESSION_TRACE, SUvNgHttp2_Error::NgHttp2Str(), and x_DelOnError().
Definition at line 575 of file ncbi_uv_nghttp2.cpp.
References buffer, Init(), m_Session, NCBI_NGHTTP2_SESSION_TRACE, SUvNgHttp2_Error::NgHttp2Str(), ncbi::grid::netcache::search::fields::size, and x_DelOnError().
Referenced by SUvNgHttp2_SessionBase::OnRead().
Definition at line 526 of file ncbi_uv_nghttp2.cpp.
References Init(), m_Session, NCBI_NGHTTP2_SESSION_TRACE, SUvNgHttp2_Error::NgHttp2Str(), and x_DelOnError().
Referenced by SH2S_Session::Event().
ssize_t SNgHttp2_Session::Send | ( | vector< char > & | buffer | ) |
Definition at line 541 of file ncbi_uv_nghttp2.cpp.
References _DEBUG_ARG, _DEBUG_CODE, buffer, data, eOkay, eWantsClose, Init(), m_Session, NCBI_NGHTTP2_SESSION_TRACE, SUvNgHttp2_Error::NgHttp2Str(), and x_DelOnError().
Referenced by SUvNgHttp2_SessionBase::Send().
int32_t SNgHttp2_Session::Submit | ( | const nghttp2_nv * | nva, |
size_t | nvlen, | ||
nghttp2_data_provider * | data_prd = nullptr |
||
) |
Definition at line 511 of file ncbi_uv_nghttp2.cpp.
References Init(), m_Session, NCBI_NGHTTP2_SESSION_TRACE, SUvNgHttp2_Error::NgHttp2Str(), and x_DelOnError().
Referenced by SPSG_IoSession::ProcessRequest(), and SH2S_Session::Request().
|
inlineprivate |
Definition at line 433 of file ncbi_uv_nghttp2.hpp.
Referenced by GetMaxStreams(), and Init().
|
private |
Definition at line 428 of file ncbi_uv_nghttp2.hpp.
Referenced by Init().
|
private |
Definition at line 431 of file ncbi_uv_nghttp2.hpp.
Referenced by Init().
|
private |
Definition at line 432 of file ncbi_uv_nghttp2.hpp.
Referenced by Init().
|
private |
Definition at line 430 of file ncbi_uv_nghttp2.hpp.
Referenced by Init().
|
private |
Definition at line 429 of file ncbi_uv_nghttp2.hpp.
Referenced by Init().
|
private |
Definition at line 426 of file ncbi_uv_nghttp2.hpp.
Referenced by Del(), Init(), Recv(), Resume(), Send(), Submit(), and x_DelOnError().
|
private |
Definition at line 427 of file ncbi_uv_nghttp2.hpp.
Referenced by Init().