diff options
author | Pixel <Pixel> | 2001-12-03 17:19:39 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-12-03 17:19:39 +0000 |
commit | 0fd3b447119000a3b29fd46fed6b955198e5d7de (patch) | |
tree | 130fad408c5c1657355884453624e226279fa3ab /include | |
parent | ebdeb96f4f8275ab45cf9819cb3624dcf49a1b2b (diff) |
Zlib done...
Diffstat (limited to 'include')
-rw-r--r-- | include/Handle.h | 8 | ||||
-rw-r--r-- | include/Socket.h | 4 |
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 |