diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2005-07-18 12:12:35 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2005-07-18 12:12:35 +0000 |
commit | af03e941b11ea0e8fca91fcf2e2df8b4939223b8 (patch) | |
tree | d1e456324d16ce87ad82d3b5d5bd83ada79b3d24 /cppe/demo/IceE/chat/Client.cpp | |
parent | Fix (diff) | |
download | ice-af03e941b11ea0e8fca91fcf2e2df8b4939223b8.tar.bz2 ice-af03e941b11ea0e8fca91fcf2e2df8b4939223b8.tar.xz ice-af03e941b11ea0e8fca91fcf2e2df8b4939223b8.zip |
Added ping thread
Diffstat (limited to 'cppe/demo/IceE/chat/Client.cpp')
-rwxr-xr-x | cppe/demo/IceE/chat/Client.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cppe/demo/IceE/chat/Client.cpp b/cppe/demo/IceE/chat/Client.cpp index bf4b8493637..d6be7d58b39 100755 --- a/cppe/demo/IceE/chat/Client.cpp +++ b/cppe/demo/IceE/chat/Client.cpp @@ -8,6 +8,7 @@ // ********************************************************************** #include <IceE/IceE.h> +#include <PingThread.h> #include <Router.h> #include <Chat.h> @@ -91,6 +92,9 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) } } + SessionPingThreadPtr ping = new SessionPingThread(session); + ping->start(); + string category = router->getServerProxy()->ice_getIdentity().category; Identity callbackReceiverIdent; callbackReceiverIdent.name = "callbackReceiver"; @@ -140,9 +144,13 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) catch(const Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); + ping->destroy(); + ping->getThreadControl().join(); return EXIT_FAILURE; } + ping->destroy(); + ping->getThreadControl().join(); return EXIT_SUCCESS; } |