From c237db48dff05742eba8a2e1ff3744032799eaf0 Mon Sep 17 00:00:00 2001
From: MrGadget <9826063+MrGadget1024@users.noreply.github.com>
Date: Tue, 14 Dec 2021 03:17:52 -0500
Subject: [PATCH] fix: Transport default channel = Reliable (#3026)
---
Assets/Mirror/Runtime/Transport/Transport.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Assets/Mirror/Runtime/Transport/Transport.cs b/Assets/Mirror/Runtime/Transport/Transport.cs
index 0edf87531..fd402c5d9 100644
--- a/Assets/Mirror/Runtime/Transport/Transport.cs
+++ b/Assets/Mirror/Runtime/Transport/Transport.cs
@@ -64,7 +64,7 @@ public virtual void ClientConnect(Uri uri)
/// Sends a message to the server over the given channel.
// The ArraySegment is only valid until returning. Copy if needed.
- public abstract void ClientSend(ArraySegment segment, int channelId);
+ public abstract void ClientSend(ArraySegment segment, int channelId = Channels.Reliable);
/// Disconnects the client from the server
public abstract void ClientDisconnect();
@@ -93,7 +93,7 @@ public virtual void ClientConnect(Uri uri)
public abstract void ServerStart();
/// Send a message to a client over the given channel.
- public abstract void ServerSend(int connectionId, ArraySegment segment, int channelId);
+ public abstract void ServerSend(int connectionId, ArraySegment segment, int channelId = Channels.Reliable);
/// Disconnect a client from the server.
public abstract void ServerDisconnect(int connectionId);
@@ -118,7 +118,7 @@ public virtual void ClientConnect(Uri uri)
// Some transports like kcp support large max packet sizes which should
// not be used for batching all the time because they end up being too
// slow (head of line blocking etc.).
- public virtual int GetBatchThreshold(int channelId)
+ public virtual int GetBatchThreshold(int channelId = Channels.Reliable)
{
return GetMaxPacketSize(channelId);
}