Exemplo n.º 1
0
    void OnDestroy()
    {
        DbAccess.CloseDB();

        if (p2pServer != null)
        {
            p2pServer.Closed();
        }
        if (p2pClient != null)
        {
            p2pClient.Closed();
        }
        if (tcpClient != null)
        {
            tcpClient.Closed();
        }

        foreach (Thread t in threads)
        {
            t.Abort();
        }
    }