Project
Loading...
Searching...
No Matches
o2::framework::WebSocketHandler Struct Reference

An handler for a websocket message stream. More...

#include <HTTPParser.h>

Inherited by TestWSHandler, o2::framework::ClientWebSocketHandler, o2::framework::ControlWebSocketHandler, and o2::framework::GUIWebSocketHandler.

Public Member Functions

virtual ~WebSocketHandler ()=default
 
virtual void headers (std::map< std::string, std::string > const &headers)
 Invoked when all the headers are received.
 
virtual void beginFragmentation ()
 FIXME: not implemented.
 
virtual void frame (char const *frame, size_t s)
 
virtual void beginChunk ()
 Invoked before processing the next round of input.
 
virtual void endChunk ()
 Invoked whenever we have no more input to process.
 
virtual void endFragmentation ()
 FIXME: not implemented.
 
virtual void control (char const *frame, size_t s)
 FIXME: not implemented.
 

Public Attributes

size_t remainingSize = 0
 Bytes which are still to be received for the previous, half delivered frame.
 
size_t pendingSize = 0
 Bytes which are already there from the previous, half delivered frame.
 
charpendingBuffer = nullptr
 A buffer large enough to contain the next frame to be processed.
 
size_t pendingHeaderSize = 0
 Bytes from an incomplete header.
 
charpendingHeader = nullptr
 

Detailed Description

An handler for a websocket message stream.

Definition at line 136 of file HTTPParser.h.

Constructor & Destructor Documentation

◆ ~WebSocketHandler()

virtual o2::framework::WebSocketHandler::~WebSocketHandler ( )
virtualdefault

Member Function Documentation

◆ beginChunk()

virtual void o2::framework::WebSocketHandler::beginChunk ( )
inlinevirtual

Invoked before processing the next round of input.

Reimplemented in o2::framework::ControlWebSocketHandler, o2::framework::GUIWebSocketHandler, and o2::framework::ClientWebSocketHandler.

Definition at line 147 of file HTTPParser.h.

◆ beginFragmentation()

virtual void o2::framework::WebSocketHandler::beginFragmentation ( )
inlinevirtual

◆ control()

virtual void o2::framework::WebSocketHandler::control ( char const *  frame,
size_t  s 
)
inlinevirtual

◆ endChunk()

virtual void o2::framework::WebSocketHandler::endChunk ( )
inlinevirtual

Invoked whenever we have no more input to process.

Reimplemented in o2::framework::ControlWebSocketHandler, o2::framework::GUIWebSocketHandler, and o2::framework::ClientWebSocketHandler.

Definition at line 149 of file HTTPParser.h.

◆ endFragmentation()

virtual void o2::framework::WebSocketHandler::endFragmentation ( )
inlinevirtual

◆ frame()

virtual void o2::framework::WebSocketHandler::frame ( char const *  frame,
size_t  s 
)
inlinevirtual

Invoked when a frame it's parsed. Notice you do not own the data and you must not free the memory.

Reimplemented in o2::framework::ControlWebSocketHandler, o2::framework::GUIWebSocketHandler, o2::framework::ClientWebSocketHandler, and TestWSHandler.

Definition at line 145 of file HTTPParser.h.

◆ headers()

virtual void o2::framework::WebSocketHandler::headers ( std::map< std::string, std::string > const &  headers)
inlinevirtual

Invoked when all the headers are received.

Reimplemented in o2::framework::ControlWebSocketHandler, o2::framework::GUIWebSocketHandler, and o2::framework::ClientWebSocketHandler.

Definition at line 140 of file HTTPParser.h.

Member Data Documentation

◆ pendingBuffer

char* o2::framework::WebSocketHandler::pendingBuffer = nullptr

A buffer large enough to contain the next frame to be processed.

Definition at line 160 of file HTTPParser.h.

◆ pendingHeader

char* o2::framework::WebSocketHandler::pendingHeader = nullptr

Definition at line 163 of file HTTPParser.h.

◆ pendingHeaderSize

size_t o2::framework::WebSocketHandler::pendingHeaderSize = 0

Bytes from an incomplete header.

Definition at line 162 of file HTTPParser.h.

◆ pendingSize

size_t o2::framework::WebSocketHandler::pendingSize = 0

Bytes which are already there from the previous, half delivered frame.

Definition at line 158 of file HTTPParser.h.

◆ remainingSize

size_t o2::framework::WebSocketHandler::remainingSize = 0

Bytes which are still to be received for the previous, half delivered frame.

Definition at line 156 of file HTTPParser.h.


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