feat(Transport): IsEncrypted, EncryptionCipher virtuals

This commit is contained in:
mischa 2024-03-07 12:10:36 +08:00 committed by MrGadget
parent 42c9e6fc62
commit 35a3d86e87

View File

@ -36,6 +36,12 @@ public abstract class Transport : MonoBehaviour
/// <summary>Is this transport available in the current platform?</summary> /// <summary>Is this transport available in the current platform?</summary>
public abstract bool Available(); public abstract bool Available();
/// <summary>Is this transported encrypted for secure communication?</summary>
public virtual bool IsEncrypted => false;
/// <summary>If encrypted, which cipher is used?</summary>
public virtual string EncryptionCipher => "";
// client ////////////////////////////////////////////////////////////// // client //////////////////////////////////////////////////////////////
/// <summary>Called by Transport when the client connected to the server.</summary> /// <summary>Called by Transport when the client connected to the server.</summary>
public Action OnClientConnected; public Action OnClientConnected;