Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::internal::service::http::HttpsConnectionExImpl Struct Referencefinal

#include <HttpConnectionEx.h>

Inheritance diagram for sese::internal::service::http::HttpsConnectionExImpl:
sese::internal::service::http::HttpConnectionEx

Public Types

using Ptr = std::shared_ptr<HttpsConnectionExImpl>
 
using Stream = asio::ssl::stream<asio::ip::tcp::socket>
 
using SharedStream = std::shared_ptr<Stream>
 
- Public Types inherited from sese::internal::service::http::HttpConnectionEx
using Ptr = std::shared_ptr<HttpConnectionEx>
 

Public Member Functions

Ptr getPtr ()
 
 HttpsConnectionExImpl (const std::shared_ptr< HttpServiceImpl > &service, asio::io_context &context, const sese::net::IPAddress::Ptr &addr, SharedStream stream)
 
void writeBlocks (const std::vector< asio::const_buffer > &buffers, const std::function< void(const asio::error_code &code)> &callback) override
 
void writeBlock (const void *buffer, size_t size, const std::function< void(const asio::error_code &code)> &callback) override
 
void readBlock (char *buffer, size_t length, const std::function< void(const asio::error_code &code)> &callback) override
 
void checkKeepalive () override
 
- Public Member Functions inherited from sese::internal::service::http::HttpConnectionEx
Ptr getPtr ()
 
 HttpConnectionEx (const std::shared_ptr< HttpServiceImpl > &service, asio::io_context &io_context, const sese::net::IPAddress::Ptr &addr)
 
virtual ~HttpConnectionEx ()=default
 
void close (uint32_t id)
 
void disponse ()
 
void readMagic ()
 
void readFrameHeader ()
 
void handleFrameHeader ()
 
uint8_t handleSettingsFrame ()
 
void handleWindowUpdate ()
 
void handleRstStreamFrame ()
 
void handleGoawayFrame ()
 
void handleHeadersFrame ()
 
void handleDataFrame ()
 
void handlePriorityFrame ()
 
void handlePingFrame ()
 
void handleRequest (const HttpStream::Ptr &stream)
 
void handleWrite ()
 
void writeSettingsFrame ()
 
void writeAckFrame ()
 
void writeGoawayFrame (uint32_t latest_stream_id, uint8_t flags, uint32_t error_code, const std::string &msg, bool once=false)
 
void writeRstStreamFrame (uint32_t stream_id, uint8_t flags, uint32_t error_code, bool once=false)
 
void writeWindowUpdateFrame (uint32_t stream_id, uint8_t flags, uint32_t window_size)
 
bool writeHeadersFrame (const HttpStream::Ptr &stream, bool verify_end_stream=true)
 
bool writeDataFrame4Body (const HttpStream::Ptr &stream)
 
bool writeDataFrame4SingleRange (const HttpStream::Ptr &stream)
 
bool writeDataFrame4Ranges (const HttpStream::Ptr &stream)
 
void writeSubheaderAndData (const HttpStream::Ptr &stream, const std::string &subheader, size_t remind)
 

Public Attributes

SharedStream stream
 
- Public Attributes inherited from sese::internal::service::http::HttpConnectionEx
bool keepalive = false
 
asio::system_timer timer
 
sese::net::IPAddress::Ptr remote_address
 
std::weak_ptr< HttpServiceImplservice
 
bool is_read = false
 
bool is_write = false
 
bool expect_ack = false
 
uint32_t accept_stream_count = 0
 
uint32_t latest_stream_ident = 0
 
sese::net::http::Http2FrameInfo frame {}
 
char temp_buffer [MAX_FRAME_SIZE] {}
 
uint32_t header_table_size = 4096
 
uint32_t enable_push = 0
 
uint32_t max_concurrent_stream = 0
 
uint32_t endpoint_init_window_size = 65535
 
uint32_t endpoint_window_size = 65535
 
uint32_t window_size = 65535
 
uint32_t endpoint_max_frame_size = 16384
 
uint32_t max_frame_size = 16384
 
uint32_t max_header_list_size = 0
 
sese::net::http::DynamicTable req_dynamic_table
 
sese::net::http::DynamicTable resp_dynamic_table
 
std::map< uint32_t, HttpStream::Ptrstreams
 
std::set< uint32_t > closed_streams
 
std::vector< sese::net::http::Http2Frame::Ptrpre_vector
 Send queues.
 
std::vector< sese::net::http::Http2Frame::Ptrvector
 
std::vector< asio::const_buffer > asio_buffers
 

Additional Inherited Members

- Static Public Attributes inherited from sese::internal::service::http::HttpConnectionEx
static constexpr uint32_t MAX_FRAME_SIZE = 16384
 
static constexpr uint32_t INIT_WINDOW_SIZE = 65535
 
static constexpr uint32_t HEADER_TABLE_SIZE = 8192
 
static constexpr uint32_t MAX_CONCURRENT_STREAMS = 16
 

Member Typedef Documentation

◆ Ptr

◆ SharedStream

◆ Stream

using sese::internal::service::http::HttpsConnectionExImpl::Stream = asio::ssl::stream<asio::ip::tcp::socket>

Constructor & Destructor Documentation

◆ HttpsConnectionExImpl()

sese::internal::service::http::HttpsConnectionExImpl::HttpsConnectionExImpl ( const std::shared_ptr< HttpServiceImpl > & service,
asio::io_context & context,
const sese::net::IPAddress::Ptr & addr,
SharedStream stream )

Member Function Documentation

◆ checkKeepalive()

void sese::internal::service::http::HttpsConnectionExImpl::checkKeepalive ( )
overridevirtual

◆ getPtr()

Ptr sese::internal::service::http::HttpsConnectionExImpl::getPtr ( )
inline

◆ readBlock()

void sese::internal::service::http::HttpsConnectionExImpl::readBlock ( char * buffer,
size_t length,
const std::function< void(const asio::error_code &code)> & callback )
overridevirtual

Read block function. This function ensures that the specified size of the buffer is completely read, and calls back immediately if an error occurs

Parameters
bufferPointer to the buffer
lengthSize of the buffer
callbackCompletion callback function

Implements sese::internal::service::http::HttpConnectionEx.

References callback(), and read().

◆ writeBlock()

void sese::internal::service::http::HttpsConnectionExImpl::writeBlock ( const void * buffer,
size_t size,
const std::function< void(const asio::error_code &code)> & callback )
overridevirtual

Write block function. This function ensures that a single block of buffer is completely written, and calls back immediately if an error occurs

Parameters
bufferSingle block buffer
sizeSize of the buffer
callbackCompletion callback function

Implements sese::internal::service::http::HttpConnectionEx.

References callback().

◆ writeBlocks()

void sese::internal::service::http::HttpsConnectionExImpl::writeBlocks ( const std::vector< asio::const_buffer > & buffers,
const std::function< void(const asio::error_code &code)> & callback )
overridevirtual

Write block function. This function ensures that the specified buffer is completely written, and calls back immediately if an error occurs

Parameters
buffersBuffer
callbackCompletion callback function

Implements sese::internal::service::http::HttpConnectionEx.

References callback().

Member Data Documentation

◆ stream

SharedStream sese::internal::service::http::HttpsConnectionExImpl::stream

The documentation for this struct was generated from the following files: