summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Handle.h8
-rw-r--r--include/Socket.h4
2 files changed, 10 insertions, 2 deletions
diff --git a/include/Handle.h b/include/Handle.h
index dd1cfd7..9fef098 100644
--- a/include/Handle.h
+++ b/include/Handle.h
@@ -2,6 +2,7 @@
#define __HANDLE_H__
#ifdef __cplusplus
+#include <zlib.h>
#include <unistd.h>
#include <iostream.h>
#include <String.h>
@@ -24,15 +25,20 @@ class Handle : public Base {
virtual String GetName();
virtual off_t GetSize();
virtual time_t GetModif();
- void close();
+ void close() throw (GeneralException);
int GetHandle();
virtual bool CanWatch();
virtual void Dup(const Handle &);
+ virtual void SetZ(int) throw (GeneralException);
protected:
Handle(int h);
private:
+ ssize_t uwrite(const void *, size_t) throw (GeneralException);
+ ssize_t uread(void *, size_t);
int h;
bool closed, nonblock;
+ gzFile zfile;
+ int z;
};
Handle & operator<<(Handle &, const String &);
diff --git a/include/Socket.h b/include/Socket.h
index a8076e3..b8ea05e 100644
--- a/include/Socket.h
+++ b/include/Socket.h
@@ -22,10 +22,12 @@ class Socket : public Handle {
virtual bool CanWrite();
virtual String GetName();
int GetPort();
+ void CloseWrite();
+ void CloseRead();
private:
Socket(int s);
- bool connected, listening;
+ bool connected, listening, writeclosed, readclosed;
};
#else