diff options
author | Pixel <pixel@nobis-crew.org> | 2009-11-10 15:12:51 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2009-11-10 15:12:51 -0800 |
commit | f20c537480956985edd5fdbb7a9b92e04c44161a (patch) | |
tree | 1c1a3d39bc9c6e4d3e2de8f67f2f5b762ba327d2 /lib | |
parent | f63c0788ca15beee089a3227f6df0e1f1b20a3c4 (diff) |
Fixing the new SocketPair functionnality...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Socket.cc | 6 |
1 files 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."); } |