From d0b986116c51158846d2eca6779222b76394ed90 Mon Sep 17 00:00:00 2001 From: teascade Date: Thu, 11 May 2017 22:20:10 +0300 Subject: [PATCH] Fix missing documentation --- Assets/Scripts/Networking/Clientside/Client.cs | 12 ++++++++++-- .../Networking/Serverside/ServerSyncHandler.cs | 8 ++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Networking/Clientside/Client.cs b/Assets/Scripts/Networking/Clientside/Client.cs index 54a018a..66d2c83 100644 --- a/Assets/Scripts/Networking/Clientside/Client.cs +++ b/Assets/Scripts/Networking/Clientside/Client.cs @@ -62,8 +62,8 @@ namespace Cyber.Networking.Clientside { /// Send messages to the server if the connection is active. /// If client is not active, this will return false, otherwise true. /// - /// - /// + /// The message type. + /// The message contents. /// Weather the send was successful or not. public static bool Send(short msgType, MessageBase message) { if (Singleton.Running) { @@ -75,6 +75,14 @@ namespace Cyber.Networking.Clientside { } } + /// + /// Sends messages to the server by a specified channel. + /// If the client is not active, this will return false, otherwise true. + /// + /// The message type. + /// The message contents. + /// The ID of the channel to be used. + /// public static bool SendByChannel(short msgType, MessageBase message, byte channelID) { if (Singleton.Running) { Singleton.NetClient.SendByChannel(msgType, message, channelID); diff --git a/Assets/Scripts/Networking/Serverside/ServerSyncHandler.cs b/Assets/Scripts/Networking/Serverside/ServerSyncHandler.cs index 748a85c..9824e34 100644 --- a/Assets/Scripts/Networking/Serverside/ServerSyncHandler.cs +++ b/Assets/Scripts/Networking/Serverside/ServerSyncHandler.cs @@ -6,11 +6,19 @@ using UnityEngine; using UnityEngine.Networking; namespace Cyber.Networking.Serverside { + + /// + /// The Server sync handler handles sync packets coming from the client, see . + /// public class ServerSyncHandler { private Dictionary LastSyncIDReceived = new Dictionary(); private Dictionary Players; + /// + /// Creates a nwe Server Sync handler for handling sync packets that are coming from the client. + /// + /// public ServerSyncHandler(Dictionary players) { Players = players; }