2017-07-01 00:18:54 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// This is to wrap the platform specific kinds of connect/read/write.
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2017-07-13 18:10:09 +01:00
|
|
|
#include <stdlib.h>
|
2017-07-01 00:18:54 +01:00
|
|
|
|
2017-07-17 17:28:54 +01:00
|
|
|
struct BaseConnection {
|
|
|
|
static BaseConnection* Create();
|
|
|
|
static void Destroy(BaseConnection*&);
|
|
|
|
bool Open();
|
|
|
|
bool Close();
|
|
|
|
bool Write(const void* data, size_t length);
|
2017-07-17 22:49:31 +01:00
|
|
|
bool Read(void* data, size_t length);
|
2017-07-01 00:18:54 +01:00
|
|
|
};
|