From 75409abcbdeb9de115b14725263b427bbedf0cc4 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 10 Nov 2009 10:00:22 -0800 Subject: Adding socketpair support. --- include/Socket.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') 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 -- cgit v1.2.3