![]() |
Project
|
#include <DPLWebSocket.h>
Inherits o2::framework::HTTPParser.
Public Member Functions | |
WSDPLHandler (uv_stream_t *stream, DriverServerContext *context) | |
virtual | ~WSDPLHandler ()=default |
void | method (std::string_view const &s) override |
void | target (std::string_view const &s) override |
void | header (std::string_view const &k, std::string_view const &v) override |
void | endHeaders () override |
void | body (char *data, size_t s) override |
Actual handling of WS frames happens inside here. | |
void | write (char const *, size_t) |
Helper to write a message to the associated client. | |
void | write (std::vector< uv_buf_t > &outputs) |
Helper to write n buffers containing websockets frames to a server. | |
void | error (int code, char const *message) |
Helper to return an error. | |
![]() | |
virtual void | version (std::string_view const &s) |
virtual void | replyVersion (std::string_view const &s) |
virtual void | replyCode (std::string_view const &s) |
virtual void | replyMessage (std::string_view const &s) |
Public Attributes | |
std::unique_ptr< WebSocketHandler > | mHandler |
bool | mHandshaken = false |
uv_stream_t * | mStream = nullptr |
std::map< std::string, std::string > | mHeaders |
DriverServerContext * | mServerContext |
![]() | |
std::string | remaining |
std::string | error |
std::vector< HTTPState > | states |
Definition at line 37 of file DPLWebSocket.h.
o2::framework::WSDPLHandler::WSDPLHandler | ( | uv_stream_t * | stream, |
DriverServerContext * | context | ||
) |
A http parser suitable to be used by DPL as a server stream is the stream from which the data is read, context to use to register the Handler to the appropriate DeviceInfo. handler is the websocket handler to react on the various frames
Definition at line 181 of file DPLWebSocket.cxx.
|
virtualdefault |
Actual handling of WS frames happens inside here.
Reimplemented from o2::framework::HTTPParser.
Definition at line 320 of file DPLWebSocket.cxx.
|
overridevirtual |
Make sure this is a websocket upgrade request.
Create an appropriate reply
Reimplemented from o2::framework::HTTPParser.
Definition at line 258 of file DPLWebSocket.cxx.
Helper to return an error.
Definition at line 376 of file DPLWebSocket.cxx.
|
overridevirtual |
Reimplemented from o2::framework::HTTPParser.
Definition at line 253 of file DPLWebSocket.cxx.
|
overridevirtual |
Reimplemented from o2::framework::HTTPParser.
Definition at line 187 of file DPLWebSocket.cxx.
|
overridevirtual |
Reimplemented from o2::framework::HTTPParser.
Definition at line 194 of file DPLWebSocket.cxx.
Helper to write a message to the associated client.
Definition at line 355 of file DPLWebSocket.cxx.
void o2::framework::WSDPLHandler::write | ( | std::vector< uv_buf_t > & | outputs | ) |
Helper to write n buffers containing websockets frames to a server.
Definition at line 363 of file DPLWebSocket.cxx.
std::unique_ptr<WebSocketHandler> o2::framework::WSDPLHandler::mHandler |
Definition at line 61 of file DPLWebSocket.h.
bool o2::framework::WSDPLHandler::mHandshaken = false |
Definition at line 62 of file DPLWebSocket.h.
std::map<std::string, std::string> o2::framework::WSDPLHandler::mHeaders |
Definition at line 64 of file DPLWebSocket.h.
DriverServerContext* o2::framework::WSDPLHandler::mServerContext |
Definition at line 65 of file DPLWebSocket.h.
uv_stream_t* o2::framework::WSDPLHandler::mStream = nullptr |
Definition at line 63 of file DPLWebSocket.h.