summaryrefslogtreecommitdiff
path: root/include/Socket.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/Socket.h')
-rw-r--r--include/Socket.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/Socket.h b/include/Socket.h
index 245ed9e..77bfedd 100644
--- a/include/Socket.h
+++ b/include/Socket.h
@@ -11,7 +11,7 @@ class Socket : public Handle {
public:
Socket() throw (GeneralException);
Socket(const Socket &);
- virtual ~Socket() {}
+ virtual ~Socket() { close(); }
bool SetLocal(const String &, int = 0);
bool Connect(const String &, int);
bool Listen();
@@ -24,6 +24,11 @@ class Socket : public Handle {
int GetPort();
void CloseWrite();
void CloseRead();
+ protected:
+ virtual ssize_t nwrite(const void *, size_t) throw (GeneralException);
+ virtual ssize_t nread(void *, size_t) throw (GeneralException);
+ virtual int ndup() const throw (GeneralException);
+ virtual int nclose() throw (GeneralException);
private:
Socket(int s);