コード例 #1
0
    public static void Main(string[] args)
    {
        string peerServer = "ws://localhost:8080/ws";

        if (args.Length == 1)
        {
            peerServer = args[0];
        }
        TestPeer app = new TestPeer();

        if (!HumbleNet.Init())
        {
            Console.WriteLine("Failed to startup");
            return;
        }

        HumbleNet.P2P.Initialize(peerServer, "client_token", "client_secret", null);

        app.Start();

        while (app.Run())
        {
        }

        app.Stop();

        HumbleNet.Shutdown();
    }
コード例 #2
0
    static public void Shutdown()
    {
#if !UNITY_WEBGL && USE_THREAD
        Poller.Shutdown();
#endif
        if (_isInitialized)
        {
            HumbleNet.Shutdown();
            _isInitialized = false;
            _isConnected   = false;
            _myPeer        = HumbleNet.PeerId.Invalid;
        }
    }