diff options
author | Mattes D <github@xoft.cz> | 2016-06-17 16:25:31 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2016-06-18 13:12:12 +0200 |
commit | 8610083a8e8ad66806c66d0199d0d8a900ceb358 (patch) | |
tree | 083bbf9029b971dbf7b74353c9c62c22de9c78c7 /src/OSSupport/NetworkSingleton.h | |
parent | SelfTests: More logging for EnumInterfaces. (diff) | |
download | cuberite-8610083a8e8ad66806c66d0199d0d8a900ceb358.tar cuberite-8610083a8e8ad66806c66d0199d0d8a900ceb358.tar.gz cuberite-8610083a8e8ad66806c66d0199d0d8a900ceb358.tar.bz2 cuberite-8610083a8e8ad66806c66d0199d0d8a900ceb358.tar.lz cuberite-8610083a8e8ad66806c66d0199d0d8a900ceb358.tar.xz cuberite-8610083a8e8ad66806c66d0199d0d8a900ceb358.tar.zst cuberite-8610083a8e8ad66806c66d0199d0d8a900ceb358.zip |
Diffstat (limited to 'src/OSSupport/NetworkSingleton.h')
-rw-r--r-- | src/OSSupport/NetworkSingleton.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/OSSupport/NetworkSingleton.h b/src/OSSupport/NetworkSingleton.h index c72df38ec..75713d261 100644 --- a/src/OSSupport/NetworkSingleton.h +++ b/src/OSSupport/NetworkSingleton.h @@ -13,6 +13,7 @@ #pragma once +#include <event2/event.h> #include "Network.h" #include "CriticalSection.h" #include "Event.h" @@ -127,11 +128,18 @@ protected: /** The thread in which the main LibEvent loop runs. */ std::thread m_EventLoopThread; + /** Event that is signalled once the startup is finished and the LibEvent loop is running. */ + UniquePtr<cEvent> m_StartupEvent; + + /** Converts LibEvent-generated log events into log messages in MCS log. */ static void LogCallback(int a_Severity, const char * a_Msg); /** Implements the thread that runs LibEvent's event dispatcher loop. */ static void RunEventLoop(cNetworkSingleton * a_Self); + + /** Callback called by LibEvent when the event loop is started. */ + static void SignalizeStartup(evutil_socket_t a_Socket, short a_Events, void * a_Self); }; |