|
nanoMMO 0.97.8
Building an MMO: The Engineering Series
|
#include <websocket.h>
Public Member Functions | |
| FrameDecoder (std::size_t max_message) | |
| A message larger than this, all its fragments together, is refused. | |
| void | Append (std::string_view bytes) |
| std::optional< Message > | Next () |
| const absl::Status & | status () const |
Reads a client's frames, which each have to be masked, and puts each message together from its fragments. Control frames (ping, pong and close) come out as they arrive, between a message's fragments too.
Definition at line 66 of file websocket.h.
|
inlineexplicit |
A message larger than this, all its fragments together, is refused.
Definition at line 69 of file websocket.h.
| void nanommo::FrameDecoder::Append | ( | std::string_view | bytes | ) |
Definition at line 170 of file websocket.cc.
| std::optional< Message > nanommo::FrameDecoder::Next | ( | ) |
The next message, or nothing until more bytes come. After a frame that breaks the protocol, returns nothing more, and status() says why.
Definition at line 183 of file websocket.cc.
|
inline |
Definition at line 77 of file websocket.h.