Split Protocol version into Handshake vs Orders.

Handshake is kept at 7.
Orders is incremented to 8 to reflect immediate order changes.
This commit is contained in:
Paul Chote
2019-05-31 19:03:49 +00:00
committed by abcdefg30
parent fe41dcb45e
commit c6232f20f9
5 changed files with 30 additions and 9 deletions

View File

@@ -167,12 +167,12 @@ namespace OpenRA.Network
{
var networkStream = (NetworkStream)networkStreamObject;
var reader = new BinaryReader(networkStream);
var serverProtocol = reader.ReadInt32();
var handshakeProtocol = reader.ReadInt32();
if (serverProtocol != ProtocolVersion.Version)
if (handshakeProtocol != ProtocolVersion.Handshake)
throw new InvalidOperationException(
"Protocol version mismatch. Server={0} Client={1}"
.F(serverProtocol, ProtocolVersion.Version));
"Handshake protocol version mismatch. Server={0} Client={1}"
.F(handshakeProtocol, ProtocolVersion.Handshake));
clientId = reader.ReadInt32();
connectionState = ConnectionState.Connected;