diff options
author | Pixel <pixel@nobis-crew.org> | 2009-11-10 10:00:22 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2009-11-10 10:00:22 -0800 |
commit | 75409abcbdeb9de115b14725263b427bbedf0cc4 (patch) | |
tree | 9366226fb4c96f6e37ec745fd4e9662cbdc4d64f /include/Socket.h | |
parent | 15b0e9849e3830eefc6c98aa7d0858981a0318b5 (diff) |
Adding socketpair support.
Diffstat (limited to 'include/Socket.h')
-rw-r--r-- | include/Socket.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/Socket.h b/include/Socket.h index bb226bc..89df89f 100644 --- a/include/Socket.h +++ b/include/Socket.h @@ -48,6 +48,8 @@ class Socket : public Handle { void CloseWrite(); void CloseRead(); bool FinalizeConnect(); + static Socket CreatePair() throw (GeneralException); + Socket GetPair() throw (GeneralException); protected: virtual ssize_t nwrite(const void *, size_t) throw (GeneralException); virtual ssize_t nread(void *, size_t) throw (GeneralException); @@ -55,8 +57,9 @@ class Socket : public Handle { virtual int nclose() throw (GeneralException); private: - Socket(int s); + Socket(int s, int p = -1); bool connected, listening, writeclosed, readclosed, connecting; + int pair; }; #endif |