tuner | Use this tuner with the server. |
maxConnections | Maximum allowed simultaneous connections for given tuner. |
Configure the server with the given tuner and connection count.
If you don't configure the server before starting it (with Listen) the default tuner (called "defaultServer") and connection count of 8, will be used.
no example available in JavaScript
using UnityEngine; using UnityEngine.Networking;
public class Example : MonoBehaviour {
void StartServer() { Tuner tuner = new Tuner("mytuner"); tuner.AddChannel(UNETQosType.ReliableSequenced); tuner.AddChannel(UNETQosType.UnreliableSequenced); tuner.maxPacketSize = 500; NetworkServer.Instance.Configure(tuner, 10); NetworkServer.Instance.Listen(7070); } }