Gonna move to server authority

This commit is contained in:
2022-01-31 17:27:38 +05:30
parent f3d21f4ec6
commit 7368968176
1354 changed files with 107808 additions and 80043 deletions

View File

@@ -1,24 +1,24 @@
using System;
namespace Mirror
{
public class NetworkConnectionToServer : NetworkConnection
{
public override string address => "";
// Send stage three: hand off to transport
protected override void SendToTransport(ArraySegment<byte> segment, int channelId = Channels.Reliable) =>
Transport.activeTransport.ClientSend(segment, channelId);
/// <summary>Disconnects this connection.</summary>
public override void Disconnect()
{
// set not ready and handle clientscene disconnect in any case
// (might be client or host mode here)
// TODO remove redundant state. have one source of truth for .ready!
isReady = false;
NetworkClient.ready = false;
Transport.activeTransport.ClientDisconnect();
}
}
}
using System;
namespace Mirror
{
public class NetworkConnectionToServer : NetworkConnection
{
public override string address => "";
// Send stage three: hand off to transport
protected override void SendToTransport(ArraySegment<byte> segment, int channelId = Channels.Reliable) =>
Transport.activeTransport.ClientSend(segment, channelId);
/// <summary>Disconnects this connection.</summary>
public override void Disconnect()
{
// set not ready and handle clientscene disconnect in any case
// (might be client or host mode here)
// TODO remove redundant state. have one source of truth for .ready!
isReady = false;
NetworkClient.ready = false;
Transport.activeTransport.ClientDisconnect();
}
}
}