docs(Transport): adding rules to remarks on transport (#2450)

* adding rules to remarks on transport

* adding default channel rule
This commit is contained in:
James Frowen 2020-11-21 17:10:09 +00:00 committed by GitHub
parent 0ab469867c
commit c8e4333d4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,35 @@ namespace Mirror
/// Abstract transport layer component /// Abstract transport layer component
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// note: Not all transports need a port, so add it to yours if needed. /// <h2>
/// Transport Rules
/// </h2>
/// <list type="bullet">
/// <listheader><description>
/// All transports should follow these rules so that they work correctly with mirror
/// </description></listheader>
/// <item><description>
/// When Monobehaviour is disabled the Transport should not invoke callbacks
/// </description></item>
/// <item><description>
/// Callbacks should be invoked on main thread. It is best to do this from LateUpdate
/// </description></item>
/// <item><description>
/// Callbacks can be invoked after <see cref="ServerStop"/> or <see cref="ClientDisconnect"/> as been called
/// </description></item>
/// <item><description>
/// <see cref="ServerStop"/> or <see cref="ClientDisconnect"/> can be called by mirror multiple times
/// </description></item>
/// <item><description>
/// <see cref="Available"/> should check the platform and 32 vs 64 bit if the transport only works on some of them
/// </description></item>
/// <item><description>
/// <see cref="GetMaxPacketSize"/> should return size even if transport is not running
/// </description></item>
/// <item><description>
/// Default channel should be reliable <see cref="Channels.DefaultReliable"/>
/// </description></item>
/// </list>
/// </remarks> /// </remarks>
public abstract class Transport : MonoBehaviour public abstract class Transport : MonoBehaviour
{ {