This commit is contained in:
Chris Marsh 2017-07-20 14:58:23 -07:00
parent 79d70b8bae
commit 85fc57dea2
3 changed files with 16 additions and 0 deletions

View file

@ -5,6 +5,9 @@
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
// not really connectiony, but need per-platform
int GetProcessId();
struct BaseConnection { struct BaseConnection {
static BaseConnection* Create(); static BaseConnection* Create();
static void Destroy(BaseConnection*&); static void Destroy(BaseConnection*&);

View file

@ -1,5 +1,13 @@
#include "connection.h" #include "connection.h"
#include <sys/types.h>
#include <unistd.h>
int GetProcessId()
{
return ::getpid();
}
const int RpcVersion = 1; const int RpcVersion = 1;
const int NumFrames = 4; const int NumFrames = 4;

View file

@ -6,6 +6,11 @@
#define NOIME #define NOIME
#include <windows.h> #include <windows.h>
int GetProcessId()
{
return ::GetCurrentProcessId();
}
struct BaseConnectionWin : public BaseConnection { struct BaseConnectionWin : public BaseConnection {
HANDLE pipe{INVALID_HANDLE_VALUE}; HANDLE pipe{INVALID_HANDLE_VALUE};
}; };