From 33318555fe9d372df2f8101b2df33b97d72f7426 Mon Sep 17 00:00:00 2001 From: vis2k Date: Fri, 18 Jun 2021 18:21:14 +0800 Subject: [PATCH] add comments --- Assets/Mirror/Runtime/LocalConnections.cs | 2 ++ Assets/Mirror/Runtime/NetworkConnectionToClient.cs | 1 + Assets/Mirror/Runtime/NetworkConnectionToServer.cs | 1 + 3 files changed, 4 insertions(+) diff --git a/Assets/Mirror/Runtime/LocalConnections.cs b/Assets/Mirror/Runtime/LocalConnections.cs index f8e9ad2ef..2cbdb035f 100644 --- a/Assets/Mirror/Runtime/LocalConnections.cs +++ b/Assets/Mirror/Runtime/LocalConnections.cs @@ -14,6 +14,7 @@ public LocalConnectionToClient() : base(LocalConnectionId, false) {} public override string address => "localhost"; + // Send stage two: serialized NetworkMessage as ArraySegment internal override void Send(ArraySegment segment, int channelId = Channels.Reliable) { // get a writer to copy the message into since the segment is only @@ -66,6 +67,7 @@ public class LocalConnectionToServer : NetworkConnectionToServer // parameterless constructor that disables batching for local connections public LocalConnectionToServer() : base(false) {} + // Send stage two: serialized NetworkMessage as ArraySegment internal override void Send(ArraySegment segment, int channelId = Channels.Reliable) { if (segment.Count == 0) diff --git a/Assets/Mirror/Runtime/NetworkConnectionToClient.cs b/Assets/Mirror/Runtime/NetworkConnectionToClient.cs index b06a4d26b..8bc24f234 100644 --- a/Assets/Mirror/Runtime/NetworkConnectionToClient.cs +++ b/Assets/Mirror/Runtime/NetworkConnectionToClient.cs @@ -16,6 +16,7 @@ public NetworkConnectionToClient(int networkConnectionId, bool batching) { } + // Send stage two: serialized NetworkMessage as ArraySegment internal override void Send(ArraySegment segment, int channelId = Channels.Reliable) { //Debug.Log("ConnectionSend " + this + " bytes:" + BitConverter.ToString(segment.Array, segment.Offset, segment.Count)); diff --git a/Assets/Mirror/Runtime/NetworkConnectionToServer.cs b/Assets/Mirror/Runtime/NetworkConnectionToServer.cs index cd2070142..b2972d8da 100644 --- a/Assets/Mirror/Runtime/NetworkConnectionToServer.cs +++ b/Assets/Mirror/Runtime/NetworkConnectionToServer.cs @@ -11,6 +11,7 @@ public NetworkConnectionToServer(bool batching) : base(batching) { } + // Send stage two: serialized NetworkMessage as ArraySegment internal override void Send(ArraySegment segment, int channelId = Channels.Reliable) { // Debug.Log("ConnectionSend " + this + " bytes:" + BitConverter.ToString(segment.Array, segment.Offset, segment.Count));