src/third-party/discord-rpc/src/connection.h (view raw)
1#pragma once
2
3// This is to wrap the platform specific kinds of connect/read/write.
4
5#include <stdint.h>
6#include <stdlib.h>
7
8// not really connectiony, but need per-platform
9int GetProcessId();
10
11struct BaseConnection {
12 static BaseConnection* Create();
13 static void Destroy(BaseConnection*&);
14 bool isOpen{false};
15 bool Open();
16 bool Close();
17 bool Write(const void* data, size_t length);
18 bool Read(void* data, size_t length);
19};