Version: 2018.1
public static bool Configure (Networking.ConnectionConfig config, int maxConnections);
public static bool Configure (Networking.HostTopology topology);

パラメーター

configトランスポート層の設定オブジェクト
maxConnections許可するクライアントの最大接続数
topology使用するトランスポート層のトポロジーオブジェクト

戻り値

bool 正常に設定されている場合、True を返します。

説明

サーバー用にトランスポート層を設定します。

using UnityEngine;
using UnityEngine.Networking;

public class Example : MonoBehaviour { void StartServer() { ConnectionConfig config = new ConnectionConfig(); config.AddChannel(QosType.ReliableSequenced); config.AddChannel(QosType.UnreliableSequenced); config.PacketSize = 500; NetworkServer.Configure(config, 10); NetworkServer.Listen(7070); } }