From 692672cd414addadfe666904c10d4492a7fcbe17 Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 10 Jan 2002 13:58:45 +0000 Subject: Socket constructor fix. --- include/Socket.h | 1 + lib/Socket.cc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/Socket.h b/include/Socket.h index 45dfa2b..203b399 100644 --- a/include/Socket.h +++ b/include/Socket.h @@ -11,6 +11,7 @@ class Socket : public Handle { public: Socket() throw (GeneralException); + Socket(const Socket &); virtual ~Socket() {} bool SetLocal(const String &, int = 0); bool Connect(const String &, int); diff --git a/lib/Socket.cc b/lib/Socket.cc index 1d7314b..cd3f4fd 100644 --- a/lib/Socket.cc +++ b/lib/Socket.cc @@ -19,6 +19,10 @@ Socket::Socket() throw (GeneralException) : Handle(socket(AF_INET, SOCK_STREAM, } } +Socket::Socket(const Socket & s) : Handle(s), connected(s.connected), listening(s.listening), writeclosed(s.writeclosed), readclosed(s.readclosed) { + cerr << "Constructing a socket by copy...\n"; +} + Socket::Socket(int h) : Handle(h), connected(true), listening(false) { } String Socket::GetName(void) { -- cgit v1.2.3