NCBI C++ ToolKit
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SNgHttp2_Session Struct Reference

Search Toolkit Book for SNgHttp2_Session

#include <connect/impl/ncbi_uv_nghttp2.hpp>

+ Collaboration diagram for SNgHttp2_Session:

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_tm_MaxStreams
 

Detailed Description

Definition at line 391 of file ncbi_uv_nghttp2.hpp.

Member Enumeration Documentation

◆ ESendResult

Enumerator
eOkay 
eWantsClose 

Definition at line 406 of file ncbi_uv_nghttp2.hpp.

Constructor & Destructor Documentation

◆ SNgHttp2_Session()

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.

Member Function Documentation

◆ Del()

void SNgHttp2_Session::Del ( )

◆ GetMaxStreams()

uint32_t SNgHttp2_Session::GetMaxStreams ( ) const
inline

Definition at line 410 of file ncbi_uv_nghttp2.hpp.

References m_MaxStreams.

Referenced by SH2S_Session::IsFull(), and SPSG_IoSession::IsFull().

◆ Init()

int SNgHttp2_Session::Init ( void  )
private

◆ Recv()

ssize_t SNgHttp2_Session::Recv ( const uint8_t buffer,
size_t  size 
)

◆ Resume()

int SNgHttp2_Session::Resume ( int32_t  stream_id)

◆ Send()

ssize_t SNgHttp2_Session::Send ( vector< char > &  buffer)

◆ Submit()

int32_t SNgHttp2_Session::Submit ( const nghttp2_nv *  nva,
size_t  nvlen,
nghttp2_data_provider *  data_prd = nullptr 
)

◆ x_DelOnError()

template<typename TInt , enable_if_t< is_signed< TInt >::value, TInt > = 0>
TInt SNgHttp2_Session::x_DelOnError ( TInt  rv)
inlineprivate

Definition at line 416 of file ncbi_uv_nghttp2.hpp.

References m_Session.

Referenced by Del(), Init(), Recv(), Resume(), Send(), and Submit().

Member Data Documentation

◆ m_MaxStreams

pair<uint32_t, const uint32_t> SNgHttp2_Session::m_MaxStreams
private

Definition at line 433 of file ncbi_uv_nghttp2.hpp.

Referenced by GetMaxStreams(), and Init().

◆ m_OnData

nghttp2_on_data_chunk_recv_callback SNgHttp2_Session::m_OnData
private

Definition at line 428 of file ncbi_uv_nghttp2.hpp.

Referenced by Init().

◆ m_OnError

nghttp2_error_callback2 SNgHttp2_Session::m_OnError
private

Definition at line 431 of file ncbi_uv_nghttp2.hpp.

Referenced by Init().

◆ m_OnFrameRecv

nghttp2_on_frame_recv_callback SNgHttp2_Session::m_OnFrameRecv
private

Definition at line 432 of file ncbi_uv_nghttp2.hpp.

Referenced by Init().

◆ m_OnHeader

nghttp2_on_header_callback SNgHttp2_Session::m_OnHeader
private

Definition at line 430 of file ncbi_uv_nghttp2.hpp.

Referenced by Init().

◆ m_OnStreamClose

nghttp2_on_stream_close_callback SNgHttp2_Session::m_OnStreamClose
private

Definition at line 429 of file ncbi_uv_nghttp2.hpp.

Referenced by Init().

◆ m_Session

nghttp2_session* SNgHttp2_Session::m_Session = nullptr
private

Definition at line 426 of file ncbi_uv_nghttp2.hpp.

Referenced by Del(), Init(), Recv(), Resume(), Send(), Submit(), and x_DelOnError().

◆ m_UserData

void* SNgHttp2_Session::m_UserData
private

Definition at line 427 of file ncbi_uv_nghttp2.hpp.

Referenced by Init().


The documentation for this struct was generated from the following files:
Modified on Wed May 29 18:39:24 2024 by modify_doxy.py rev. 669887