2017-06-30 23:18:54 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// This is to wrap the platform specific kinds of connect/read/write.
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2017-07-13 17:10:09 +00:00
|
|
|
#include <stdlib.h>
|
2017-06-30 23:18:54 +00:00
|
|
|
|
2017-07-20 21:58:23 +00:00
|
|
|
// not really connectiony, but need per-platform
|
|
|
|
int GetProcessId();
|
|
|
|
|
2017-07-17 16:28:54 +00:00
|
|
|
struct BaseConnection {
|
|
|
|
static BaseConnection* Create();
|
|
|
|
static void Destroy(BaseConnection*&);
|
2017-07-31 21:42:36 +00:00
|
|
|
bool isOpen{false};
|
2017-07-17 16:28:54 +00:00
|
|
|
bool Open();
|
|
|
|
bool Close();
|
|
|
|
bool Write(const void* data, size_t length);
|
2017-07-17 21:49:31 +00:00
|
|
|
bool Read(void* data, size_t length);
|
2017-06-30 23:18:54 +00:00
|
|
|
};
|