Class DittoConfig.Connect.SmallPeersOnly

java.lang.Object
com.ditto.java.DittoConfig.Connect
com.ditto.java.DittoConfig.Connect.SmallPeersOnly
Enclosing class:
DittoConfig.Connect

public static final class DittoConfig.Connect.SmallPeersOnly extends DittoConfig.Connect
Configuration for peer-to-peer connections without a server. This mode allows Ditto to operate in a mesh network where peers connect directly to each other without requiring a central server.
  • Constructor Details

    • SmallPeersOnly

      public SmallPeersOnly(@Nullable String privateKey)
      Creates a SmallPeersOnly connection configuration with the specified private key.
      Parameters:
      privateKey - the private key for this peer, or null to auto-generate one.
    • SmallPeersOnly

      public SmallPeersOnly()
      Creates a SmallPeersOnly connection configuration with an auto-generated private key.
  • Method Details

    • getPrivateKey

      public @Nullable String getPrivateKey()
      Returns the private key for this peer.
      Returns:
      the private key string, or null if not set.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object