TCPLink: call networking callbacks with LibEvent unlocked. (#3515)
This commit is contained in:
parent
28cc26c54c
commit
ff1c0605db
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
cTCPLinkImpl::cTCPLinkImpl(cTCPLink::cCallbacksPtr a_LinkCallbacks):
|
cTCPLinkImpl::cTCPLinkImpl(cTCPLink::cCallbacksPtr a_LinkCallbacks):
|
||||||
super(a_LinkCallbacks),
|
super(a_LinkCallbacks),
|
||||||
m_BufferEvent(bufferevent_socket_new(cNetworkSingleton::Get().GetEventBase(), -1, BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE)),
|
m_BufferEvent(bufferevent_socket_new(cNetworkSingleton::Get().GetEventBase(), -1, BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE | BEV_OPT_DEFER_CALLBACKS | BEV_OPT_UNLOCK_CALLBACKS)),
|
||||||
m_LocalPort(0),
|
m_LocalPort(0),
|
||||||
m_RemotePort(0),
|
m_RemotePort(0),
|
||||||
m_ShouldShutdown(false)
|
m_ShouldShutdown(false)
|
||||||
@ -31,7 +31,7 @@ cTCPLinkImpl::cTCPLinkImpl(cTCPLink::cCallbacksPtr a_LinkCallbacks):
|
|||||||
|
|
||||||
cTCPLinkImpl::cTCPLinkImpl(evutil_socket_t a_Socket, cTCPLink::cCallbacksPtr a_LinkCallbacks, cServerHandleImplPtr a_Server, const sockaddr * a_Address, socklen_t a_AddrLen):
|
cTCPLinkImpl::cTCPLinkImpl(evutil_socket_t a_Socket, cTCPLink::cCallbacksPtr a_LinkCallbacks, cServerHandleImplPtr a_Server, const sockaddr * a_Address, socklen_t a_AddrLen):
|
||||||
super(a_LinkCallbacks),
|
super(a_LinkCallbacks),
|
||||||
m_BufferEvent(bufferevent_socket_new(cNetworkSingleton::Get().GetEventBase(), a_Socket, BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE)),
|
m_BufferEvent(bufferevent_socket_new(cNetworkSingleton::Get().GetEventBase(), a_Socket, BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE | BEV_OPT_DEFER_CALLBACKS | BEV_OPT_UNLOCK_CALLBACKS)),
|
||||||
m_Server(a_Server),
|
m_Server(a_Server),
|
||||||
m_LocalPort(0),
|
m_LocalPort(0),
|
||||||
m_RemotePort(0),
|
m_RemotePort(0),
|
||||||
|
Loading…
Reference in New Issue
Block a user