|
RetroArch
|
#include <rpc_connection.h>
Classes | |
| struct | MessageFrame |
| struct | MessageFrameHeader |
Public Types | |
| enum | ErrorCode : int { ErrorCode::Success = 0, ErrorCode::PipeClosed = 1, ErrorCode::ReadCorrupt = 2 } |
| enum | Opcode : uint32_t { Opcode::Handshake = 0, Opcode::Frame = 1, Opcode::Close = 2, Opcode::Ping = 3, Opcode::Pong = 4 } |
| enum | State : uint32_t { State::Disconnected, State::SentHandshake, State::AwaitingResponse, State::Connected } |
Public Member Functions | |
| bool | IsOpen () const |
| void | Open () |
| void | Close () |
| bool | Write (const void *data, size_t length) |
| bool | Read (JsonDocument &message) |
Static Public Member Functions | |
| static RpcConnection * | Create (const char *applicationId) |
| static void | Destroy (RpcConnection *&) |
Public Attributes | |
| BaseConnection * | connection {nullptr} |
| State | state {State::Disconnected} |
| void(* | onConnect )(JsonDocument &message) |
| void(* | onDisconnect )(int errorCode, const char *message) |
| char | appId [64] {} |
| int | lastErrorCode {0} |
| char | lastErrorMessage [256] {} |
| RpcConnection::MessageFrame | sendFrame |
|
strong |
|
strong |
|
strong |
| void RpcConnection::Close | ( | ) |
|
static |
|
static |
|
inline |
| void RpcConnection::Open | ( | ) |
| bool RpcConnection::Read | ( | JsonDocument & | message | ) |
| char RpcConnection::appId[64] {} |
| BaseConnection* RpcConnection::connection {nullptr} |
| int RpcConnection::lastErrorCode {0} |
| char RpcConnection::lastErrorMessage[256] {} |
|
inline |
| RpcConnection::MessageFrame RpcConnection::sendFrame |
| State RpcConnection::state {State::Disconnected} |
1.8.15