Class DittoTcpListenConfig

java.lang.Object
com.ditto.java.transports.DittoTcpListenConfig

public final class DittoTcpListenConfig extends Object
Configuration for listening on a TCP socket to accept incoming sync connections. This is an advanced server-like configuration for specific use cases. Most applications should use peer-to-peer transports or connect to existing servers instead.
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Returns whether TCP listening is enabled.
      Returns:
      true if TCP listen is enabled, false otherwise.
    • getInterfaceIp

      public @NonNull String getInterfaceIp()
      Returns the network interface IP address to bind to.
      Returns:
      the interface IP address string.
    • getPort

      public int getPort()
      Returns the TCP port number to listen on.
      Returns:
      the port number.
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object