|
@@ -22,15 +22,15 @@ namespace KairoEngine.Multiplayer
|
|
|
playerName = reader.ReadFixedString64().ToString();
|
|
|
}
|
|
|
|
|
|
- public override void SendMessage(ServerBehaviour server, NetMsg netMsg, ref DataStreamWriter writer, int clientId)
|
|
|
- {
|
|
|
- if(server == null) return;
|
|
|
- NetHandshakeMsg netHandshakeMsg = (NetHandshakeMsg)netMsg;
|
|
|
- string text = $"Accepting handshake from client (ID {clientId}, playerName = {netHandshakeMsg.playerName})";
|
|
|
- if(server.debug) Debug.Log(text);
|
|
|
- NetMsgEvents.Trigger($"{server.eventStreamName}_AcceptingHandshake", text, clientId, code, netHandshakeMsg);
|
|
|
- netHandshakeMsg.Serialize(ref writer);
|
|
|
- }
|
|
|
+ // public override void SendMessage(ServerBehaviour server, NetMsg netMsg, ref DataStreamWriter writer, int clientId)
|
|
|
+ // {
|
|
|
+ // if(server == null) return;
|
|
|
+ // NetHandshakeMsg netHandshakeMsg = (NetHandshakeMsg)netMsg;
|
|
|
+ // string text = $"Accepting handshake from client (ID {clientId}, playerName = {netHandshakeMsg.playerName})";
|
|
|
+ // if(server.debug) Debug.Log(text);
|
|
|
+ // NetMsgEvents.Trigger($"{server.eventStreamName}_AcceptingHandshake", text, clientId, code, netHandshakeMsg);
|
|
|
+ // netHandshakeMsg.Serialize(ref writer);
|
|
|
+ // }
|
|
|
|
|
|
public override void SendMessage(ClientBehaviour client, NetMsg netMsg, ref DataStreamWriter writer )
|
|
|
{
|
|
@@ -49,12 +49,12 @@ namespace KairoEngine.Multiplayer
|
|
|
return netHandshakeMsg;
|
|
|
}
|
|
|
|
|
|
- public override NetMsg ReceiveMessage(ClientBehaviour client, ref DataStreamReader stream)
|
|
|
- {
|
|
|
- NetHandshakeMsg netHandshakeMsg = new NetHandshakeMsg();
|
|
|
- netHandshakeMsg.Deserialize(ref stream);
|
|
|
- return netHandshakeMsg;
|
|
|
- }
|
|
|
+ // public override NetMsg ReceiveMessage(ClientBehaviour client, ref DataStreamReader stream)
|
|
|
+ // {
|
|
|
+ // NetHandshakeMsg netHandshakeMsg = new NetHandshakeMsg();
|
|
|
+ // netHandshakeMsg.Deserialize(ref stream);
|
|
|
+ // return netHandshakeMsg;
|
|
|
+ // }
|
|
|
|
|
|
public override void ReadMessage(ServerBehaviour server, int clientId = -1)
|
|
|
{
|