![]() |
Project
|
An handler for a websocket message stream. More...
#include <ControlWebSocketHandler.h>
Inherits o2::framework::WebSocketHandler.
Public Member Functions | |
| ControlWebSocketHandler (DriverServerContext &context) | |
| ~ControlWebSocketHandler () override=default | |
| void | headers (std::map< std::string, std::string > const &headers) override |
| void | beginFragmentation () override |
| FIXME: not implemented by the backend. | |
| void | frame (char const *frame, size_t s) override |
| void | endFragmentation () override |
| FIXME: not implemented. | |
| void | control (char const *frame, size_t s) override |
| FIXME: not implemented. | |
| void | beginChunk () override |
| void | endChunk () override |
Public Member Functions inherited from o2::framework::WebSocketHandler | |
| virtual | ~WebSocketHandler ()=default |
Public Attributes | |
| DriverServerContext & | mContext |
| pid_t | mPid = 0 |
| size_t | mIndex = (size_t)-1 |
| The index of the remote process associated to this handler. | |
| bool | didProcessMetric = false |
| bool | didHaveNewMetric = false |
Public Attributes inherited from o2::framework::WebSocketHandler | |
| 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. | |
| char * | pendingBuffer = nullptr |
| A buffer large enough to contain the next frame to be processed. | |
| size_t | pendingHeaderSize = 0 |
| Bytes from an incomplete header. | |
| char * | pendingHeader = nullptr |
An handler for a websocket message stream.
Definition at line 23 of file ControlWebSocketHandler.h.
| o2::framework::ControlWebSocketHandler::ControlWebSocketHandler | ( | DriverServerContext & | context | ) |
Definition at line 67 of file ControlWebSocketHandler.cxx.
|
overridedefault |
|
inlineoverridevirtual |
Invoked at the beginning of some incoming data. We simply reset actions which need to happen on a per chunk basis.
Reimplemented from o2::framework::WebSocketHandler.
Definition at line 49 of file ControlWebSocketHandler.h.
|
inlineoverridevirtual |
FIXME: not implemented by the backend.
Reimplemented from o2::framework::WebSocketHandler.
Definition at line 36 of file ControlWebSocketHandler.h.
|
inlineoverridevirtual |
FIXME: not implemented.
Reimplemented from o2::framework::WebSocketHandler.
Definition at line 45 of file ControlWebSocketHandler.h.
|
overridevirtual |
Invoked after we have processed all the available incoming data. In this particular case we must handle the metric callbacks, if needed.
Reimplemented from o2::framework::WebSocketHandler.
Definition at line 71 of file ControlWebSocketHandler.cxx.
|
inlineoverridevirtual |
FIXME: not implemented.
Reimplemented from o2::framework::WebSocketHandler.
Definition at line 43 of file ControlWebSocketHandler.h.
Invoked when a frame it's parsed. Notice you do not own the data and you must not free the memory.
Reimplemented from o2::framework::WebSocketHandler.
Definition at line 22 of file ControlWebSocketHandler.cxx.
|
overridevirtual |
Invoked at the end of the headers. as a special header we have "x-dpl-pid" which devices can use to identify themselves. FIXME: No effort is done to guarantee their identity. Maybe each device should be started with a unique secret if we wanted to provide some secutity.
Reimplemented from o2::framework::WebSocketHandler.
Definition at line 91 of file ControlWebSocketHandler.cxx.
| bool o2::framework::ControlWebSocketHandler::didHaveNewMetric = false |
Definition at line 72 of file ControlWebSocketHandler.h.
| bool o2::framework::ControlWebSocketHandler::didProcessMetric = false |
Wether any frame operation between beginChunk and endChunk actually processed some metric.
Definition at line 71 of file ControlWebSocketHandler.h.
| DriverServerContext& o2::framework::ControlWebSocketHandler::mContext |
The driver context were we want to accumulate changes which we got from the websocket.
Definition at line 62 of file ControlWebSocketHandler.h.
| size_t o2::framework::ControlWebSocketHandler::mIndex = (size_t)-1 |
The index of the remote process associated to this handler.
Definition at line 68 of file ControlWebSocketHandler.h.
| pid_t o2::framework::ControlWebSocketHandler::mPid = 0 |
The pid of the remote process actually associated to this handler. Notice that this information comes as part of the HTTP headers via x-dpl-pid.
Definition at line 66 of file ControlWebSocketHandler.h.