예제 #1
0
파일: NetworkJoin.cs 프로젝트: Civa/Zenith
        public NetworkJoinModel()
        {
            UpdateState(State.Ready);

            _node = new ZenithNetworkNode();
            _node.Initialize();
        }
예제 #2
0
파일: Network.cs 프로젝트: Civa/Zenith
        public void Run()
        {
            //NetworkConfig worldwideConfig = new NetworkConfig();
            //INetworkTransmission worldwideTransmission = new TcpNetworkTransmission(worldwideConfig);
            //INetworkCoordinator<NodeMetadata> worldwide = new WorldwideNetworkCoordinator(worldwideTransmission);

            //NetworkConfig localConfig = new NetworkConfig();
            //INetworkTransmission localTransmission = new TcpNetworkTransmission(localConfig);
            //INetworkCoordinator<NodeMetadata> local = new LocalNetworkCoordinator(localTransmission);

            //Node node = new Node();
            //node.AddCoordinator(worldwide);
            //node.AddCoordinator(local);

            //node.JoinNetwork(CancellationToken.None);

            //NetworkNode node = new NetworkNode();

            //INetworkProvider global = new GlobalNetworkProvider(new GlobalNetworkServiceContainer());
            //INetworkProvider local = new LocalNetworkProvider(new LocalNetworkServiceContainer());

            //node.NetworkProviders.Add("Global", global);
            //node.NetworkProviders.Add("Local", local);

            //node.Join();

            ZenithNetworkNode node = new ZenithNetworkNode();
            node.Initialize();
            node.Join();
        }