mirror of
https://github.com/debauchee/barrier.git
synced 2025-07-26 04:47:34 +02:00
updated pluging loader for Windows #4313
This commit is contained in:
parent
de8fe7e2a5
commit
1d7eb3f5cb
12 changed files with 180 additions and 48 deletions
|
@ -17,21 +17,41 @@
|
|||
|
||||
#include "ns.h"
|
||||
|
||||
#include "SecureSocket.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
SecureSocket* g_secureSocket = NULL;
|
||||
|
||||
extern "C" {
|
||||
|
||||
int
|
||||
init(void (*sendEvent)(const char*, void*), void (*log)(const char*))
|
||||
{
|
||||
std::cout << "hello world" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void*
|
||||
invoke(const char* command, void* args)
|
||||
{
|
||||
if (strcmp(command, "getSecureSocket") == 0) {
|
||||
if (g_secureSocket == NULL) {
|
||||
g_secureSocket = new SecureSocket();
|
||||
}
|
||||
return g_secureSocket;
|
||||
}
|
||||
else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
cleanup()
|
||||
{
|
||||
std::cout << "goodbye world" << std::endl;
|
||||
if (g_secureSocket != NULL) {
|
||||
delete g_secureSocket;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue