summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Socket.cc6
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.");
}