summaryrefslogtreecommitdiff
path: root/src/multiserver.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-03-12 16:21:25 +0000
committerMike Buland <eichlan@xagasoft.com>2010-03-12 16:21:25 +0000
commit14a460c60b162aefaf1798c71ac790ad574e739f (patch)
tree2e9920d5f671a55f5ec380787eca34c62f97afef /src/multiserver.h
parent3667cec1f612e6a37479f99bd1fa23d92af7cff7 (diff)
downloadlibbu++-14a460c60b162aefaf1798c71ac790ad574e739f.tar.gz
libbu++-14a460c60b162aefaf1798c71ac790ad574e739f.tar.bz2
libbu++-14a460c60b162aefaf1798c71ac790ad574e739f.tar.xz
libbu++-14a460c60b162aefaf1798c71ac790ad574e739f.zip
The server and multiserver now support a shutdown() function which calls
onCloseConnection on each client before cleaning it up, allowing for smooth cleanup. Later we may want to add a nicer version with a timeout for pending data to be transmitted and the like. This one is pretty harsh.
Diffstat (limited to 'src/multiserver.h')
-rw-r--r--src/multiserver.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/multiserver.h b/src/multiserver.h
index 2938e0b..fc8305f 100644
--- a/src/multiserver.h
+++ b/src/multiserver.h
@@ -45,6 +45,8 @@ namespace Bu
45 virtual void onNewConnection( Client *pClient, int nPort ); 45 virtual void onNewConnection( Client *pClient, int nPort );
46 virtual void onClosedConnection( Client *pClient ); 46 virtual void onClosedConnection( Client *pClient );
47 47
48 void shutdown();
49
48 private: 50 private:
49 Bu::Hash<int, Protocol *(*)()> hProtos; 51 Bu::Hash<int, Protocol *(*)()> hProtos;
50 }; 52 };