add comments

This commit is contained in:
vis2k 2021-06-18 18:21:14 +08:00
parent bbde7edc1d
commit 33318555fe
3 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,7 @@ public LocalConnectionToClient() : base(LocalConnectionId, false) {}
public override string address => "localhost";
// Send stage two: serialized NetworkMessage as ArraySegment<byte>
internal override void Send(ArraySegment<byte> 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<byte>
internal override void Send(ArraySegment<byte> segment, int channelId = Channels.Reliable)
{
if (segment.Count == 0)

View File

@ -16,6 +16,7 @@ public NetworkConnectionToClient(int networkConnectionId, bool batching)
{
}
// Send stage two: serialized NetworkMessage as ArraySegment<byte>
internal override void Send(ArraySegment<byte> segment, int channelId = Channels.Reliable)
{
//Debug.Log("ConnectionSend " + this + " bytes:" + BitConverter.ToString(segment.Array, segment.Offset, segment.Count));

View File

@ -11,6 +11,7 @@ public NetworkConnectionToServer(bool batching) : base(batching)
{
}
// Send stage two: serialized NetworkMessage as ArraySegment<byte>
internal override void Send(ArraySegment<byte> segment, int channelId = Channels.Reliable)
{
// Debug.Log("ConnectionSend " + this + " bytes:" + BitConverter.ToString(segment.Array, segment.Offset, segment.Count));