aboutsummaryrefslogtreecommitdiff
path: root/daemon/OlySocket.h
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/OlySocket.h')
-rw-r--r--daemon/OlySocket.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/daemon/OlySocket.h b/daemon/OlySocket.h
index eab786b..20c67cc 100644
--- a/daemon/OlySocket.h
+++ b/daemon/OlySocket.h
@@ -9,13 +9,15 @@
#ifndef __OLY_SOCKET_H__
#define __OLY_SOCKET_H__
+#include <stddef.h>
+
class OlySocket {
public:
- OlySocket(int port, const char* hostname);
- OlySocket(int socketID);
#ifndef WIN32
- OlySocket(const char* path);
+ static int connect(const char* path, const size_t pathSize);
#endif
+
+ OlySocket(int socketID);
~OlySocket();
void closeSocket();
@@ -29,21 +31,21 @@ public:
private:
int mSocketID;
-
- void createClientSocket(const char* hostname, int port);
};
class OlyServerSocket {
public:
OlyServerSocket(int port);
#ifndef WIN32
- OlyServerSocket(const char* path);
+ OlyServerSocket(const char* path, const size_t pathSize);
#endif
~OlyServerSocket();
int acceptConnection();
void closeServerSocket();
+ int getFd() { return mFDServer; }
+
private:
int mFDServer;