1
0

cNetwork: Added link creation callback.

This allows the callback classes to store the link inside them and use it internally later on, mainly for sending data.
This commit is contained in:
Mattes D
2015-01-22 13:00:32 +01:00
parent 5b4c5cf2be
commit dbf7f13bd4
6 changed files with 90 additions and 26 deletions

View File

@@ -283,6 +283,8 @@ void cServerHandleImpl::Callback(evconnlistener * a_Listener, evutil_socket_t a_
cCSLock Lock(Self->m_CS);
Self->m_Connections.push_back(Link);
} // Lock(m_CS)
LinkCallbacks->OnLinkCreated(Link);
Link->Enable();
// Call the OnAccepted callback:
Self->m_ListenCallbacks->OnAccepted(*Link);