diff options
author | Mattes D <github@xoft.cz> | 2015-01-30 08:40:45 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-01-30 08:40:45 +0100 |
commit | fd49e34e331fc716c48ea1228f24954e9b8b5304 (patch) | |
tree | 8d19b61fb5b3052b870ccc9ac956c5069d12dc74 /tests/Network/EchoServer.cpp | |
parent | Updated PolarSSL. (diff) | |
parent | Fixed listening ports not closed on cServerHandle::Close. (diff) | |
download | cuberite-fd49e34e331fc716c48ea1228f24954e9b8b5304.tar cuberite-fd49e34e331fc716c48ea1228f24954e9b8b5304.tar.gz cuberite-fd49e34e331fc716c48ea1228f24954e9b8b5304.tar.bz2 cuberite-fd49e34e331fc716c48ea1228f24954e9b8b5304.tar.lz cuberite-fd49e34e331fc716c48ea1228f24954e9b8b5304.tar.xz cuberite-fd49e34e331fc716c48ea1228f24954e9b8b5304.tar.zst cuberite-fd49e34e331fc716c48ea1228f24954e9b8b5304.zip |
Diffstat (limited to 'tests/Network/EchoServer.cpp')
-rw-r--r-- | tests/Network/EchoServer.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/Network/EchoServer.cpp b/tests/Network/EchoServer.cpp index 728db0b7c..5f4b7651d 100644 --- a/tests/Network/EchoServer.cpp +++ b/tests/Network/EchoServer.cpp @@ -7,6 +7,7 @@ #include <iostream> #include <string> #include "OSSupport/Network.h" +#include "OSSupport/NetworkSingleton.h" @@ -98,7 +99,7 @@ class cEchoServerCallbacks: -int main() +void DoTest(void) { LOGD("EchoServer: starting up"); cServerHandlePtr Server = cNetwork::Listen(9876, std::make_shared<cEchoServerCallbacks>()); @@ -119,9 +120,20 @@ int main() Server->Close(); ASSERT(!Server->IsListening()); LOGD("Server has been closed."); +} + + + + + +int main() +{ + DoTest(); printf("Press enter to exit test.\n"); + AString line; std::getline(std::cin, line); + cNetworkSingleton::Get().Terminate(); LOG("Network test finished."); return 0; |