mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 19:10:32 +00:00
35fee94d56
* Moved doc files to docfx folder * load csproj * doc generation * Run docfx * Add docfx * Deploy docs to mirror-networking.com * use deploy phase * deploy whole generated site * Fixed the semantic release command * Is last \ required? * show debug log * using lftp for site deploy * Testing lftp * Show current folder * try -e command option * Show me the files * use plain ftp * use choco install instead of cinst * fix ssl certificate validation * fix username * Upload site to xmldocs folder * no need to archive docs * No need for debug output * Fix file permissions * show me .htaccess * Show me contents * Wipe out folder to fix permissions * Set file permissions * Fix file permissions * complete toc list * Migrated intro page * Remove old docs * Update link to docs * Add link to github * Only update docs for stuff in master * This is a powershell command * Update doc/articles/Concepts/Communications/RemoteActions.md * Update doc/articles/Concepts/VisibilityCustom.md * Update doc/articles/Concepts/Authority.md * Update doc/articles/Concepts/GameObjects/SpawnObjectCustom.md * Update doc/articles/Concepts/Authority.md * Update doc/articles/Classes/SyncVars.md * No need to run semver twice
87 lines
2.5 KiB
Markdown
87 lines
2.5 KiB
Markdown
# NetworkServer
|
|
|
|
NetworkServer is a High-Level-API class that manages connections from multiple clients.
|
|
|
|
## Properties
|
|
|
|
- **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**\<T\>(Action\<NetworkConnection, T\> 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\>(T msg, int channelId = Channels.DefaultReliable)
|
|
|
|
- static void **SendToClient**\<T\>(int connectionId, T msg)
|
|
|
|
- static void **SendToClientOfPlayer**\<T\>(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**\<T\>()
|
|
|
|
- static void **UnSpawn**(GameObject obj)
|