From 0ff04c1cf0c87e46dabc8618a98802618d2766a7 Mon Sep 17 00:00:00 2001 From: vis2k Date: Tue, 4 Apr 2023 18:41:54 +0800 Subject: [PATCH] feature: PortTransport interface --- Assets/Mirror/Core/PortTransport.cs | 13 +++++++++++++ Assets/Mirror/Core/PortTransport.cs.meta | 11 +++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Assets/Mirror/Core/PortTransport.cs create mode 100644 Assets/Mirror/Core/PortTransport.cs.meta diff --git a/Assets/Mirror/Core/PortTransport.cs b/Assets/Mirror/Core/PortTransport.cs new file mode 100644 index 000000000..19a7dfd43 --- /dev/null +++ b/Assets/Mirror/Core/PortTransport.cs @@ -0,0 +1,13 @@ +// convenience interface for transports which use a port. +// useful for cases where someone wants to 'just set the port' independent of +// which transport it is. +// +// note that not all transports have ports, but most do. + +namespace Mirror +{ + public interface PortTransport + { + ushort Port { get; set; } + } +} diff --git a/Assets/Mirror/Core/PortTransport.cs.meta b/Assets/Mirror/Core/PortTransport.cs.meta new file mode 100644 index 000000000..3f96d30e1 --- /dev/null +++ b/Assets/Mirror/Core/PortTransport.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f7c7c2820d7974cb28c7bfe9aae890a0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3} + userData: + assetBundleName: + assetBundleVariant: