This commit is contained in:
vis2k 2021-03-09 14:56:54 +08:00
parent 387571722b
commit 4e71f324c6

View File

@ -57,9 +57,7 @@ internal NetworkConnection(int networkConnectionId) : this()
// TODO why isn't lastMessageTime set in here like in the other ctor? // TODO why isn't lastMessageTime set in here like in the other ctor?
} }
/// <summary> /// <summary>Disconnects this connection.</summary>
/// Disconnects this connection.
/// </summary>
public abstract void Disconnect(); public abstract void Disconnect();
internal void SetHandlers(Dictionary<int, NetworkMessageDelegate> handlers) internal void SetHandlers(Dictionary<int, NetworkMessageDelegate> handlers)
@ -67,12 +65,7 @@ internal void SetHandlers(Dictionary<int, NetworkMessageDelegate> handlers)
messageHandlers = handlers; messageHandlers = handlers;
} }
/// <summary> /// <summary>Send a NetworkMessage to this connection over the given channel.</summary>
/// This sends a network message with a message ID on the connection. This message is sent on channel zero, which by default is the reliable channel.
/// </summary>
/// <typeparam name="T">The message type to unregister.</typeparam>
/// <param name="msg">The message to send.</param>
/// <param name="channelId">The transport layer channel to send on.</param>
public void Send<T>(T msg, int channelId = Channels.DefaultReliable) public void Send<T>(T msg, int channelId = Channels.DefaultReliable)
where T : struct, NetworkMessage where T : struct, NetworkMessage
{ {