コード例 #1
0
ファイル: Protagoras.cs プロジェクト: gantar22/Protagoras
    // Use this for initialization
    void Start()
    {
        NetworkTransport.Init();

        ConnectionConfig config = new ConnectionConfig();

        reliable_channel     = config.AddChannel(QosType.Reliable);
        unreliable_channel   = config.AddChannel(QosType.Unreliable);
        all_cost_channel     = config.AddChannel(QosType.AllCostDelivery);
        state_update_channel = config.AddChannel(QosType.StateUpdate);
        large_data_channel   = config.AddChannel(QosType.ReliableFragmentedSequenced);

        topology = new HostTopology(config, MAX_PLAYERS);
        host     = NetworkTransport.AddHost(topology, port);
        //print("server host:");
        //print(host);


        pm = new Party_manager();
        pm.init();
        StartCoroutine(receive());
        StartCoroutine(inform_players());
    }