summaryrefslogtreecommitdiff
path: root/src/Socket.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-02-17 14:47:45 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-02-17 14:47:45 +0000
commit8acb1181f9b6879b9520a824d1e15fa0dd889624 (patch)
treea941d2bfadede6851bf46dcb87e7f5832b5109ea /src/Socket.h
parent52634627bc3be9365180e52d7a96c9ca8497f3dc (diff)
Added SocketCore, make Socket a handle class for SocketCore.
Diffstat (limited to 'src/Socket.h')
-rw-r--r--src/Socket.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Socket.h b/src/Socket.h
index 3f38a343..e6254f17 100644
--- a/src/Socket.h
+++ b/src/Socket.h
@@ -23,13 +23,14 @@
#define _D_SOCKET_H_
#include <string>
+#include "SocketCore.h"
using namespace std;
class Socket {
-public:
+private:
// socket endpoint descriptor
- int sockfd;
+ SocketCore* core;
public:
Socket();
Socket(const Socket& s);
@@ -37,6 +38,8 @@ public:
Socket& operator=(const Socket& s);
+ int getSockfd() const { return core->sockfd; }
+
/**
* Connects to the server named host and the destination port is port.
* This method make socket non-blocking mode.