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
46 lines
1.3 KiB
Markdown
46 lines
1.3 KiB
Markdown
# NetworkClient
|
||
|
||
`NetworkClient` is a high-level API class that manages a network connection from a client to a server, and can send and receive messages between the client and the server. The `NetworkClient` class also helps to manage spawned network game object, and routing of RPC message and network events.
|
||
|
||
## Properties
|
||
|
||
- **active**
|
||
True while a client is connecting / connected.
|
||
|
||
- **allClients**
|
||
Deprecated. Use NetworkClient directly instead. There is always exactly one client.
|
||
|
||
- **connection**
|
||
The NetworkConnection game object this `NetworkClient` instance is using.
|
||
|
||
- **handlers**
|
||
The set of registered message handler functions.
|
||
|
||
- **isConnected**
|
||
True if the client is connected to a server.
|
||
|
||
- **numChannels**
|
||
Deprecated. QoS channels are available in some [Transports].
|
||
|
||
- **serverIP**
|
||
The IP address of the server this client is connected to.
|
||
|
||
- **serverPort**
|
||
Deprecated. Port was moved to the [Transports](../Transports/index.md) that support it.
|
||
|
||
## Methods
|
||
|
||
- static void **Connect**(string address)
|
||
|
||
- static void **Disconnect**()
|
||
|
||
- static void **RegisterHandler**\<T\>(Action\<NetworkConnection, T\> handler)
|
||
|
||
- static bool **Send**\<T\>(T message, int channelId = Channels.DefaultReliable)
|
||
|
||
- static void **Shutdown**()
|
||
|
||
- static void **UnregisterHandler**\<T\>()
|
||
|
||
|