From c95a08a41cdf3c09ceb0a552b7614ce08095198a Mon Sep 17 00:00:00 2001 From: Chris Langsenkamp Date: Tue, 25 Jun 2019 02:18:08 -0400 Subject: [PATCH] Updated NetworkServer Doc --- docs/Classes/NetworkServer.md | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/docs/Classes/NetworkServer.md b/docs/Classes/NetworkServer.md index 0f34cebf8..5bba0b7e7 100644 --- a/docs/Classes/NetworkServer.md +++ b/docs/Classes/NetworkServer.md @@ -6,15 +6,81 @@ NetworkServer is a High-Level-API class that manages connections from multiple c - **active** Checks if the server has been started. + - **connections** A list of all the current connections from clients. + - **dontListen** If you enable this, the server will not listen for incoming connections on the regular network port. + - **handlers** Dictionary of the message handlers registered with the server. + - **hostTopology** The host topology that the server is using. + - **localClientActive** True if a local client is currently active on the server. + - **localConnection** The connection to the local client. This is only used when in host mode + +## Methods + +- static bool **AddConnection**(NetworkConnection conn) + +- static bool **AddPlayerForConnection**(NetworkConnection conn, GameObject player) + +- static bool **AddPlayerForConnection**(NetworkConnection conn, GameObject player, Guid assetId) + +- static void **ClearHandlers**() + +- static void **Destroy**(GameObject obj) + +- static void **DestroyPlayerForConnection**(NetworkConnection conn) + +- static void **DisconnectAll**() + +- static void **DisconnectAllConnections**() + +- static bool **Listen**(int maxConns) + +- static void **RegisterHandler**\(Action\ handler) + +- static bool **RemoveConnection**(int connectionId) + +- static bool **ReplacePlayerForConnection**(NetworkConnection conn, GameObject player) + +- static bool **ReplacePlayerForConnection**(NetworkConnection conn, GameObject player, Guid assetId) + +- static void **Reset**() + +- static bool **SendToAll**\(T msg, int channelId = Channels.DefaultReliable) + +- static void **SendToClient**\(int connectionId, T msg) + +- static void **SendToClientOfPlayer**\(NetworkIdentity identity, T msg) + +- static void **SetAllClientsNotReady**() + +- static void **SetClientNotReady**(NetworkConnection conn) + +- static void **SetClientReady**(NetworkConnection conn) + +- static void **Shutdown**() + +- static void **Spawn**(GameObject obj) + +- static void **Spawn**(GameObject obj, Guid assetId) + +- static bool **SpawnObjects**() + +- static bool **SpawnWithClientAuthority**(GameObject obj, GameObject player) + +- static bool **SpawnWithClientAuthority**(GameObject obj, NetworkConnection conn) + +- static bool **SpawnWithClientAuthority**(GameObject obj, Guid assetId, NetworkConnection conn) + +- static void **UnregisterHandler**\() + +- static void **UnSpawn**(GameObject obj)