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
24 lines
1.7 KiB
Markdown
24 lines
1.7 KiB
Markdown
# MultiplexTransport
|
|
|
|
The MultiplexTransport is not a transport itself, but it allows you to combine other transports so that your clients can connect to your servers via either one of them.
|
|
|
|
A common use case for the MultiplexTransport is a server listening to both websockets and TCP. Your webgl clients can connect to the server using websockets and your mobile or desktop clients can connect to the same server via TCP. In HLAPI, you had to chose between websockets and UDP, but you cannot use both at the same time. You can configure any number of transports in the MultiplexTransport.
|
|
|
|
To use the MultiplexTransport follow these steps:
|
|
|
|
1. Add a gameobject with a NetworkManager to your scene if you have not done so
|
|
2. By default, Unity will add TelepathyTransport to your NetworkManager game object
|
|
3. Add a MultiplexTransport component to the gameobject
|
|
4. Assign the MultiplexTransport component in your NetworkManager's transport
|
|
5. Add a WebsocketTransport component to the gameobject
|
|
6. Add the TelepathyTransport component to the MultiplexTransport as the first transport
|
|
7. Add the WebsocketTransport component to the MultiplexTransport as the second transport
|
|
|
|
Please note that Telepathy and WebsocketTransport cannot listen to the same port. By default Telepathy listens to 7777 and the websocket transport listens to 7778.
|
|
|
|
If you build your game as a webgl game, the TelepathyTransport will be skipped and your client will use the websocket transport. If you build your game as a mobile or desktop app, it will choose TelepathyTransport. The server will happily accept connections from both.
|
|
|
|
Here is what the configuration should look like:
|
|
|
|
![Multiplex Example](MultiplexSample.png)
|