summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Handle.cc4
-rw-r--r--lib/Socket.cc12
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc
index f77b0c3..da29a51 100644
--- a/lib/Handle.cc
+++ b/lib/Handle.cc
@@ -7,7 +7,7 @@
#include "config.h"
Handle::Handle(const Handle & nh) : h(nh.h >= 0 ? dup(nh.h) : nh.h), closed(nh.closed), nonblock(nh.closed), zfile(0), z(0) {
- cerr << "Duplication of handle " << nh.h << " to " << h << endl;
+// cerr << "Duplication of handle " << nh.h << " to " << h << endl;
if ((h >= 0) && (nh.z)) {
SetZ(nh.z);
}
@@ -218,7 +218,7 @@ void Handle::SetZ(int az) throw (GeneralException) {
}
format[index++] = (char) (az + '0');
format[index] = 0;
- cerr << "Performing gzdopen on handle " << h << " with mode \"" << format << "\"\n";
+// cerr << "Performing gzdopen on handle " << h << " with mode \"" << format << "\"\n";
if (!(zfile = gzdopen(h, format))) {
throw GeneralException(_("Was not able to gzdopen."));
}
diff --git a/lib/Socket.cc b/lib/Socket.cc
index 0e882a1..c5a43ab 100644
--- a/lib/Socket.cc
+++ b/lib/Socket.cc
@@ -14,18 +14,18 @@
#include "config.h"
Socket::Socket() throw (GeneralException) : Handle(socket(AF_INET, SOCK_STREAM, 0)), connected(false), listening(false), writeclosed(false), readclosed(false) {
- cerr << "Socket(): connected = " << connected << "; readclosed = " << readclosed << "; writeclosed = " << writeclosed << endl;
+// cerr << "Socket(): connected = " << connected << "; readclosed = " << readclosed << "; writeclosed = " << writeclosed << endl;
if (GetHandle() < 0) {
throw GeneralException(_("Error creating socket."));
}
}
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";
- cerr << "Socket(const Socket &): connected = " << connected << "; readclosed = " << readclosed << "; writeclosed = " << writeclosed << endl;
+// cerr << "Constructing a socket by copy...\n";
+// cerr << "Socket(const Socket &): connected = " << connected << "; readclosed = " << readclosed << "; writeclosed = " << writeclosed << endl;
}
-Socket::Socket(int h) : Handle(h), connected(true), listening(false) { }
+Socket::Socket(int h) : Handle(h), connected(true), listening(false), writeclosed(false), readclosed(false) { }
String Socket::GetName(void) {
return String("socket");
@@ -40,12 +40,12 @@ bool Socket::IsListening(void) {
}
bool Socket::CanRead(void) {
- cerr << "CanRead: connected = " << connected << "; readclosed = " << readclosed << endl;
+// cerr << "CanRead: connected = " << connected << "; readclosed = " << readclosed << endl;
return connected && !readclosed;
}
bool Socket::CanWrite(void) {
- cerr << "CanWrite: connected = " << connected << "; writeclosed = " << writeclosed << endl;
+// cerr << "CanWrite: connected = " << connected << "; writeclosed = " << writeclosed << endl;
return connected && !writeclosed;
}