From 7cddb6237418f2d7ec984cd0d4cbdac7140330b0 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 15 Jan 2015 21:10:14 +0100 Subject: cNetwork: Added an OnError callback for listening servers. The callback receives the error details. --- src/OSSupport/Network.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/OSSupport/Network.cpp') diff --git a/src/OSSupport/Network.cpp b/src/OSSupport/Network.cpp index af63c75d0..4dc8d1df1 100644 --- a/src/OSSupport/Network.cpp +++ b/src/OSSupport/Network.cpp @@ -841,6 +841,10 @@ cServerHandleImplPtr cServerHandleImpl::Listen( { cNetworkSingleton::Get().AddServer(res); } + else + { + a_ListenCallbacks->OnError(res->m_ErrorCode, res->m_ErrorMsg); + } return res; } @@ -1062,6 +1066,7 @@ cTCPLink::cTCPLink(cCallbacksPtr a_Callbacks): + //////////////////////////////////////////////////////////////////////////////// // cNetworkSingleton: -- cgit v1.2.3