mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
add comment
This commit is contained in:
parent
939f2820ea
commit
9b2e7d09c7
@ -64,6 +64,23 @@ internal NetworkConnection(int networkConnectionId) : this()
|
||||
}
|
||||
|
||||
/// <summary>Disconnects this connection.</summary>
|
||||
// for future reference, here is how Disconnects work in Mirror.
|
||||
//
|
||||
// first, there are two types of disconnects:
|
||||
// * voluntary: the other end simply disconnected
|
||||
// * involuntary: server disconnects a client by itself
|
||||
//
|
||||
// UNET had special (complex) code to handle both cases differently.
|
||||
//
|
||||
// Mirror handles both cases the same way:
|
||||
// * Disconnect is called from TOP to BOTTOM
|
||||
// NetworkServer/Client -> NetworkConnection -> Transport.Disconnect()
|
||||
// * Disconnect is handled from BOTTOM to TOP
|
||||
// Transport.OnDisconnected -> ...
|
||||
//
|
||||
// in other words, calling Disconnect() does no cleanup whatsoever.
|
||||
// it simply asks the transport to disconnect.
|
||||
// then later the transport events will do the clean up.
|
||||
public abstract void Disconnect();
|
||||
|
||||
internal void SetHandlers(Dictionary<ushort, NetworkMessageDelegate> handlers)
|
||||
|
Loading…
Reference in New Issue
Block a user