23#ifndef TESSERACT_VIEWER_SVUTIL_H_
24#define TESSERACT_VIEWER_SVUTIL_H_
29# include <semaphore.h>
41 static void StartProcess(
const char *executable,
const char *args);
60#elif defined(__APPLE__)
74 SVNetwork(
const char *hostname,
int port);
80 void Send(
const char *msg);
94 std::mutex mutex_send_;
101 std::string msg_buffer_out_;
The SVSync class provides functionality for Thread & Process Creation.
static void StartProcess(const char *executable, const char *args)
Starts a new process.
void Signal()
Signal a semaphore.
~SVSemaphore()
Cleans up the mutex.
SVSemaphore()
Sets up a semaphore.
void Wait()
Wait on a semaphore.
void Flush()
Flush the buffer.
SVNetwork(const char *hostname, int port)
Set up a connection to hostname on port.
void Send(const char *msg)
Put a message in the messagebuffer to the server and try to send it.
void Close()
Close the connection to the server.