Package 

Class TorClient

  • All Implemented Interfaces:
    co.electriccoin.lightwallet.client.util.Disposable

    
    public final class TorClient
     implements Disposable
                        
    • Method Detail

      • isolatedTorClient

         final TorClient isolatedTorClient()

        Returns a new isolated TorClient handle.

        The two TorClients will share internal state and configuration, but their streams will never share circuits with one another.

        Use this method when you want separate parts of your program to each have a TorClient handle, but where you don't want their activities to be linkable to one another over the Tor network.

        Calling this method is usually preferable to creating a completely separate TorClient instance, since it can share its internals with the existing TorClient.

      • setDormant

         final <ERROR CLASS> setDormant(TorDormantMode mode)

        Changes the client's current dormant mode, putting background tasks to sleep or waking them up as appropriate.

        This can be used to conserve CPU usage if you aren’t planning on using the client for a while, especially on mobile platforms.

      • createIsolatedWalletClient

         final PartialTorWalletClient createIsolatedWalletClient(String endpoint)

        Connects to the lightwalletd server at the given endpoint.

        This client is isolated from any other Tor usage, and queries made with this client are isolated from each other (but may still be correlatable by the server through request timing, if the caller does not mitigate timing attacks).

      • createWalletClient

         final PartialTorWalletClient createWalletClient(String endpoint)

        Connects to the lightwalletd server at the given endpoint.

        This client is isolated from any other Tor usage. Queries made with this client are not isolated from each other; use createIsolatedWalletClient() if you need this.