discord-rpc/src/connection.h
msciotti c59fd6df20
Revert "Choose pipe number on initialize (#250)"
This reverts commit 4824b20f28b1ebffb2a57881684ef87f76659a6c.
2019-01-24 13:23:35 -08:00

20 lines
453 B
C

#pragma once
// This is to wrap the platform specific kinds of connect/read/write.
#include <stdint.h>
#include <stdlib.h>
// not really connectiony, but need per-platform
int GetProcessId();
struct BaseConnection {
static BaseConnection* Create();
static void Destroy(BaseConnection*&);
bool isOpen{false};
bool Open();
bool Close();
bool Write(const void* data, size_t length);
bool Read(void* data, size_t length);
};