diff options
author | Howaner <franzi.moos@googlemail.com> | 2015-02-06 21:52:14 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2015-02-06 21:52:14 +0100 |
commit | 2c7925f0adc17d7680ff9791832ab2c349c2301f (patch) | |
tree | ef6233b0d9dece6f7520996f2a4d850470e2c2d3 /tests/Network/EchoServer.cpp | |
parent | Readded old DistributeStackToAreas() comment. (diff) | |
parent | Switched LuaState to use sizeof... (diff) | |
download | cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.gz cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.bz2 cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.lz cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.xz cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.zst cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.zip |
Diffstat (limited to '')
-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; |