ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
HostPacketBinding Class Reference

Public Member Functions

int receive (unsigned id, unsigned type, ProtocolBytes packet)

Detailed Description

Definition at line 123 of file session_host.cpp.

Member Function Documentation

◆ receive()

int HostPacketBinding::receive ( unsigned id,
unsigned type,
ProtocolBytes packet )
inline

Definition at line 125 of file session_host.cpp.

125 {
126 const size_t length = packet["length"].as<size_t>();
127 input_.resize(length ? length : 1);
128 if (length)
129 emscripten::val(emscripten::typed_memory_view(length, input_.data())).call<void>("set", packet);
130 return browser_host_receive(id, type, input_.data(), length);
131 }

Referenced by EMSCRIPTEN_BINDINGS().


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