Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
symbian::websocket::WebSocket Class Reference

Single-owner RFC 8441 WebSocket endpoint over nghttp2. More...

#include <cpp/symbian/websocket/websocket.h>

Classes

struct  State
 

Public Member Functions

 ~WebSocket ()
 
 WebSocket (const WebSocket &)=delete
 
WebSocket & operator= (const WebSocket &)=delete
 
absl::Status Feed (std::string_view bytes)
 
absl::StatusOr< std::string > TakeOutput ()
 
absl::Status Send (std::string_view message)
 
absl::StatusOr< std::optional< std::string > > Receive ()
 
absl::Status Close ()
 
void Abort ()
 
bool open () const
 
bool closed () const
 
std::size_t buffered_amount () const
 

Static Public Member Functions

static absl::StatusOr< std::unique_ptr< WebSocket > > Create (Role role, Options options={})
 

Detailed Description

Single-owner RFC 8441 WebSocket endpoint over nghttp2.

Feed receives arbitrary TCP chunks; TakeOutput returns HTTP/2 bytes for transport. Send/Receive preserve binary message boundaries, with bounded queues and HTTP/2 flow control. Each endpoint serves one CONNECT stream. The caller supplies unpredictable masking keys for every client frame. This codec owns no socket, thread, Python reference or authentication policy. Drain output before reading again, including after peer close. An error is terminal; discard the connection after any transport failure.

Constructor & Destructor Documentation

◆ ~WebSocket()

symbian::websocket::WebSocket::~WebSocket ( )
default

◆ WebSocket()

symbian::websocket::WebSocket::WebSocket ( const WebSocket &  )
delete

Member Function Documentation

◆ Abort()

void symbian::websocket::WebSocket::Abort ( )

◆ buffered_amount()

std::size_t symbian::websocket::WebSocket::buffered_amount ( ) const

◆ Close()

absl::Status symbian::websocket::WebSocket::Close ( )

◆ closed()

bool symbian::websocket::WebSocket::closed ( ) const

◆ Create()

absl::StatusOr< std::unique_ptr< WebSocket > > symbian::websocket::WebSocket::Create ( Role  role,
Options  options = {} 
)
static

◆ Feed()

absl::Status symbian::websocket::WebSocket::Feed ( std::string_view  bytes)

◆ open()

bool symbian::websocket::WebSocket::open ( ) const

◆ operator=()

WebSocket & symbian::websocket::WebSocket::operator= ( const WebSocket &  )
delete

◆ Receive()

absl::StatusOr< std::optional< std::string > > symbian::websocket::WebSocket::Receive ( )

◆ Send()

absl::Status symbian::websocket::WebSocket::Send ( std::string_view  message)

◆ TakeOutput()

absl::StatusOr< std::string > symbian::websocket::WebSocket::TakeOutput ( )

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