summaryrefslogtreecommitdiff
path: root/server/connection.h
diff options
context:
space:
mode:
authorschmirl <schmirl>2007-04-02 10:32:34 +0000
committerschmirl <schmirl>2007-04-02 10:32:34 +0000
commit525574f9b01275aaff3e1c923cc91404365d501e (patch)
tree0533e2aaecdd3e7a1fe26176d12895f9bd054bc0 /server/connection.h
parentcd7d4e3588af2cc36c8366fc8d65d0627a372c32 (diff)
downloadvdr-plugin-streamdev-525574f9b01275aaff3e1c923cc91404365d501e.tar.gz
vdr-plugin-streamdev-525574f9b01275aaff3e1c923cc91404365d501e.tar.bz2
Close connection when client is gone. Fixes high CPU load problem (#201)
Modified Files: server/connection.h server/connectionHTTP.h server/connectionVTP.h server/server.c server/streamer.c server/streamer.h tools/select.c tools/select.h tools/source.c
Diffstat (limited to 'server/connection.h')
-rw-r--r--server/connection.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/connection.h b/server/connection.h
index f68f84a..2df850e 100644
--- a/server/connection.h
+++ b/server/connection.h
@@ -1,5 +1,5 @@
/*
- * $Id: connection.h,v 1.3 2005/05/09 20:22:29 lordjaxom Exp $
+ * $Id: connection.h,v 1.4 2007/04/02 10:32:34 schmirl Exp $
*/
#ifndef VDR_STREAMDEV_SERVER_CONNECTION_H
@@ -69,6 +69,10 @@ public:
the connection shall be closed and removed by the server */
virtual bool Read(void);
+ /* Is polled regularely by the server. Returns true if the connection
+ needs to be terminated. */
+ virtual bool Abort(void) const = 0;
+
/* Will make the socket close after sending all queued output data */
void DeferClose(void) { m_DeferClose = true; }