mirror of
https://github.com/yuzu-emu/discord-rpc
synced 2024-11-23 15:13:38 +00:00
less magic number
This commit is contained in:
parent
0f10ebff43
commit
c8e81c2c81
1 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,9 @@
|
||||||
#include "connection.h"
|
#include "connection.h"
|
||||||
#include "rapidjson/document.h"
|
#include "rapidjson/document.h"
|
||||||
|
|
||||||
|
// I took this from the buffer size libuv uses for named pipes; I suspect ours would usually be much smaller.
|
||||||
|
constexpr size_t MaxRpcFrameSize = 64 * 1024;
|
||||||
|
|
||||||
struct RpcConnection {
|
struct RpcConnection {
|
||||||
enum class Opcode : uint32_t {
|
enum class Opcode : uint32_t {
|
||||||
Handshake = 0,
|
Handshake = 0,
|
||||||
|
@ -18,7 +21,7 @@ struct RpcConnection {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MessageFrame : public MessageFrameHeader {
|
struct MessageFrame : public MessageFrameHeader {
|
||||||
char message[64 * 1024 - sizeof(MessageFrameHeader)];
|
char message[MaxRpcFrameSize - sizeof(MessageFrameHeader)];
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class State : uint32_t {
|
enum class State : uint32_t {
|
||||||
|
|
Loading…
Reference in a new issue