mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-08 06:31:50 +08:00
Fixed handling of handshake complete. Was posting an event for it
but making direct calls for other messages from the server. This could cause messages to be handled out of order. Now making a direct call for handshake complete.
This commit is contained in:
@@ -29,9 +29,6 @@
|
||||
// CServerProxy
|
||||
//
|
||||
|
||||
CEvent::Type CServerProxy::s_handshakeCompleteEvent =
|
||||
CEvent::kUnknown;
|
||||
|
||||
CServerProxy::CServerProxy(CClient* client, IStream* stream) :
|
||||
m_client(client),
|
||||
m_stream(stream),
|
||||
@@ -66,13 +63,6 @@ CServerProxy::~CServerProxy()
|
||||
m_stream->getEventTarget());
|
||||
}
|
||||
|
||||
CEvent::Type
|
||||
CServerProxy::getHandshakeCompleteEvent()
|
||||
{
|
||||
return CEvent::registerTypeOnce(s_handshakeCompleteEvent,
|
||||
"CServerProxy::handshakeComplete");
|
||||
}
|
||||
|
||||
void
|
||||
CServerProxy::installHeartBeat(double heartRate)
|
||||
{
|
||||
@@ -141,7 +131,7 @@ CServerProxy::parseHandshakeMessage(const UInt8* code)
|
||||
|
||||
// handshake is complete
|
||||
m_parser = &CServerProxy::parseMessage;
|
||||
EVENTQUEUE->addEvent(CEvent(getHandshakeCompleteEvent(), this));
|
||||
m_client->handshakeComplete();
|
||||
}
|
||||
|
||||
else if (memcmp(code, kMsgCResetOptions, 4) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user