Ejemplo n.º 1
0
    // 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());
    }