From f20c537480956985edd5fdbb7a9b92e04c44161a Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 10 Nov 2009 15:12:51 -0800 Subject: Fixing the new SocketPair functionnality... --- lib/Socket.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Socket.cc b/lib/Socket.cc index a78178b..8585aee 100644 --- a/lib/Socket.cc +++ b/lib/Socket.cc @@ -68,7 +68,7 @@ Socket::Socket(const Socket & s) : Handle(s), connected(s.connected), listening( Socket::Socket(int h, int p) : Handle(h), connected(true), listening(false), writeclosed(false), readclosed(false), connecting(false), pair(p) { } -static Socket CreatePair() throw (GeneralException) { +Socket Socket::CreatePair() throw (GeneralException) { int socks[2]; #ifdef _WIN32 struct sockaddr_in addr; @@ -123,11 +123,11 @@ static Socket CreatePair() throw (GeneralException) { #endif } -Socket GetPair() throw (GeneralException) { +Socket Socket::GetPair() throw (GeneralException) { if (pair != -1) { int p = pair; pair = -1; - return Socket(pair); + return Socket(p); } throw GeneralException("Not a paired socket."); } -- cgit v1.2.3