docs: Updating transport docs (#2337)

* updating transport pages on litenetlib and simpleweb transports

* updating other pages to reference new transports

* updating links for new transports
This commit is contained in:
James Frowen 2020-10-16 19:01:39 +01:00 committed by GitHub
parent 9d2334ca19
commit b44cf7dbcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 89 additions and 18 deletions

View File

@ -25,9 +25,9 @@ TCP is better for slower paced games where latency isn't important.
#### Transports #### Transports
* [Telepathy](https://mirror-networking.com/docs/Articles/Transports/Telepathy.html) * [Telepathy](../Transports/Telepathy.md)
* [Apathy](https://mirror-networking.com/apathy/) * [Apathy](https://mirror-networking.com/apathy/)
* [WebGL](https://mirror-networking.com/docs/Articles/Transports/WebSockets.html) * [WebGL](../Transports/SimpleWebTransport.md)
## [UDP (User Datagram Protocol)](https://en.wikipedia.org/wiki/User_Datagram_Protocol) ## [UDP (User Datagram Protocol)](https://en.wikipedia.org/wiki/User_Datagram_Protocol)
@ -45,11 +45,11 @@ UDP is better for fast paced games where latency is important and if a few packe
#### Transports #### Transports
* [Ignorance](https://mirror-networking.com/docs/Articles/Transports/Ignorance.html) * [Ignorance](../Transports/Ignorance.md)
* [LiteNetLib](https://mirror-networking.com/docs/Articles/Transports/LiteNetLib4Mirror.html) * [LiteNetLib](../Transports/LiteNetLibTransport.md)
## The choice is yours ## The choice is yours
Mirror is transport independent, they can simply by added to your NetworkManager GameObject. Mirror comes with 2 built in transports to pick from, [Telepathy](../Transports/Telepathy.md) and [Ninja WebSockets](../Transports/WebSockets.md). See the [transports](../Transports/index.md) page for more about transports. Mirror is transport independent, they can simply by added to your NetworkManager GameObject. Mirror comes with 2 built in transports to pick from, [Telepathy](../Transports/Telepathy.md) and [Ninja WebSockets](../Transports/SimpleWebTransport.md). See the [transports](../Transports/index.md) page for more about transports.
Pick whatever works best for you. We recommend you profile your game and collect real world numbers before you make a final decision. Pick whatever works best for you. We recommend you profile your game and collect real world numbers before you make a final decision.

View File

@ -0,0 +1,29 @@
# LiteNetLib Transport
**[LiteNetLib](https://github.com/RevenantX/LiteNetLib) based transport for Mirror.**
Source code: [LiteNetLibTransport](https://github.com/MirrorNetworking/LiteNetLibTransport)
*Old version (not maintained) [LiteNetLib4Mirror](./LiteNetLib4Mirror.md)*
![Inspector](./LiteNetLibTransportInspector.jpg)
## Usage
1) Download the code from the source folder or package on [Release](https://github.com/MirrorNetworking/LiteNetLibTransport/releases) page.
2) Put the code somewhere in your Assets folder
3) Replace your existing Transport with LiteNetLibTransport on your NetworkManager
## Features
- UDP
- Fully managed code
- Small CPU and RAM usage
see full features of LiteNetLib [here](https://github.com/RevenantX/LiteNetLib)
## Bugs?
Please report any bugs or issues [Here](https://github.com/MirrorNetworking/LiteNetLibTransport/issues)

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -0,0 +1,47 @@
# Simple Web Transport
Transport that uses the websocket protocol. This allows this transport to be used in WebGL builds of unity.
Source code: [SimpleWebTransport](https://github.com/MirrorNetworking/SimpleWebTransport)
![Inspector](./SimpleWebTransportInspector.jpg)
## Usage
1) Download the code from the source folder or package on [Release](https://github.com/MirrorNetworking/SimpleWebTransport/releases) page.
2) Put the code somewhere in your Assets folder
3) Replace your existing Transport with SimpleWebTransport on your NetworkManager
## Bugs?
Please report any bugs or issues [Here](https://github.com/MirrorNetworking/SimpleWebTransport/issues)
# Websocket Secure
This transport supports the wss protocol which is required for https pages.
## How to create and setup an SSL Cert
If you host your webgl build on a https domain you will need to use wss which will require a ssl cert.
[See this page](https://github.com/MirrorNetworking/SimpleWebTransport/blob/master/HowToCreateSSLCert.md)
# Logging
Log levels can be set using the dropdown on the transport or or setting `Mirror.SimpleWeb.Log.level`.
The transport applies the dropdown value in its `Awake` and `OnValidate` methods.
### Log methods
Log methods in this transport use the [ConditionalAttribute](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.conditionalattribute?view=netstandard-2.0) so they are removed depending on the preprocessor defines.
These preprocessor defines effect the logging
- `DEBUG` allows warn/error logs
- `SIMPLEWEB_LOG_ENABLED` allows all logs
Without `SIMPLEWEB_LOG_ENABLED` info or verbose logging will never happen even if log level allows it.
See the [Unity docs](https://docs.unity3d.com/Manual/PlatformDependentCompilation.html) on how set custom defines.

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

View File

@ -1,5 +0,0 @@
# WebSockets Transport
General description of WebSockets
![The WebSockets Transport component in the Inspector window](WebsocketTransport.PNG)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

View File

@ -8,7 +8,7 @@ Mirror is a high level Networking Library that can use several different low lev
- [TCP - Booster](https://mirror-networking.com/booster/) The Mirror Booster uncorks your multiplayer game by moving the Networking load out of Unity! - [TCP - Booster](https://mirror-networking.com/booster/) The Mirror Booster uncorks your multiplayer game by moving the Networking load out of Unity!
- [WebGL - WebSockets](WebSockets.md) WebSockets transport layer for Mirror that target WebGL clients, without relying on Unity's stodgy old LLAPI. - [WebSockets - SimpleWebTransport](SimpleWebTransport.md) WebSockets transport layer for Mirror that target WebGL clients.
- [Multiplexer](Multiplexer.md) Multiplexer is a bridging transport to allow a server to handle clients on different transports concurrently, for example desktop clients using Telepathy together with WebGL clients using Websockets. - [Multiplexer](Multiplexer.md) Multiplexer is a bridging transport to allow a server to handle clients on different transports concurrently, for example desktop clients using Telepathy together with WebGL clients using Websockets.
@ -16,7 +16,7 @@ Mirror is a high level Networking Library that can use several different low lev
- [UDP - Ignorance](Ignorance.md) Ignorance implements a reliable and unreliable sequenced UDP transport based on ENet. - [UDP - Ignorance](Ignorance.md) Ignorance implements a reliable and unreliable sequenced UDP transport based on ENet.
- [UDP - LiteNetLib4Mirror](LiteNetLib4Mirror.md) LiteNetLib4Mirror implements a UDP transport based on LiteNetLib with Network Discovery and uPnP included. - [UDP - LiteNetLibTransport](LiteNetLibTransport.md) LiteNetLibTransport implements a UDP transport based on [LiteNetLib](https://github.com/RevenantX/LiteNetLib).
- [Steam - FizzySteamworks](FizzySteamworks.md) Transport utilising Steam P2P network, building on Steamworks.NET. - [Steam - FizzySteamworks](FizzySteamworks.md) Transport utilising Steam P2P network, building on Steamworks.NET.

View File

@ -2,16 +2,16 @@
href: index.md href: index.md
- name: TCP - Telepathy - name: TCP - Telepathy
href: Telepathy.md href: Telepathy.md
- name: WebGL - WebSockets - name: WebGL - SimpleWebTransport
href: WebSockets.md href: SimpleWebTransport.md
- name: Multiplexer - name: Multiplexer
href: Multiplexer.md href: Multiplexer.md
- name: Fallback - name: Fallback
href: Fallback.md href: Fallback.md
- name: UDP - Ignorance - name: UDP - Ignorance
href: Ignorance.md href: Ignorance.md
- name: UDP - LiteNetLib4Mirror - name: UDP - LiteNetLibTransport
href: LiteNetLib4Mirror.md href: LiteNetLibTransport.md
- name: Steam - FizzySteamworks - name: Steam - FizzySteamworks
href: FizzySteamworks.md href: FizzySteamworks.md
- name: Steam - FizzyFacepunch - name: Steam - FizzyFacepunch

View File

@ -15,8 +15,8 @@ uMMORPG was possible with \<6000 lines of code. We needed a networking library t
**Multiple Transports Available:** **Multiple Transports Available:**
- **TCP** ([Telepathy](Articles/Transports/Telepathy.md) and [Apathy](https://mirror-networking.com/apathy/) and [Booster](https://mirror-networking.com/booster/)) - **TCP** ([Telepathy](Articles/Transports/Telepathy.md) and [Apathy](https://mirror-networking.com/apathy/) and [Booster](https://mirror-networking.com/booster/))
- **UDP** ([ENet](Articles/Transports/Ignorance.md) and [LiteNetLib](Articles/Transports/LiteNetLib4Mirror.md)) - **UDP** ([ENet](Articles/Transports/Ignorance.md) and [LiteNetLib](Articles/Transports/LiteNetLibTransport.md))
- **WebGL** ([Secure Web Sockets](Articles/Transports/WebSockets.md)) - **WebGL** ([Secure Web Sockets](Articles/Transports/SimpleWebTransport.md))
- **Steam** ([Steamworks.Net](Articles/Transports/FizzySteamworks.md)) and ([FacePunch](Articles/Transports/FizzyFacepunch.md)) - **Steam** ([Steamworks.Net](Articles/Transports/FizzySteamworks.md)) and ([FacePunch](Articles/Transports/FizzyFacepunch.md))
- **Multiplexer** ([Multiplexer](Articles/Transports/Multiplexer.md)) - **Multiplexer** ([Multiplexer](Articles/Transports/Multiplexer.md))
- **Fallback** ([Fallback](Articles/Transports/Fallback.md)) - **Fallback** ([Fallback](Articles/Transports/Fallback.md))