Experimental Functionality

  • Upcoming SDK features made available for prototyping.

    Warning

    Experimental functionality should not be used in production applications as it may be changed or removed at any time, and may not have the same security features.
    See more

    Declaration

    Swift

    public class DittoExperimental
  • Undocumented

    See more

    Declaration

    Swift

    public class DittoPeerV2Parser
  • An address uniquely representing another device on the Ditto network.

    See more

    Declaration

    Swift

    public class DittoAddress : Equatable, Hashable
  • Send and receive messages with remote Ditto peers in the mesh.

    Ditto Bus is separate from the replicated document database. It is used to send one-off messages or create continuous channels with other peers in the mesh, without any persistence. Messages are treated as opaque binary by Ditto and must be created and interpreted by your app.

    Possible uses include:

    • Remote control systems
    • Tunnelling other protocols
    • Gaming
    • Voice and video

    Ditto Bus communications are always between two distinct peers, 1-to-1, and are offered with various delivery guarantees.

    For simple use cases there is a single-message API. These are received on the other peer via DittoBusDelegate.

    In advanced situations with requirements such as multiple overlapping streams, notification of stream start and end, and backpressure, individual streams can be opened using the openStream() function. Once opened, these are symmetric/bidirectional message-oriented communication channels. The remote peer will receive their stream via DittoBusDelegate.

    See more

    Declaration

    Swift

    public class DittoBus
  • Callbacks relating to Ditto Bus for both receiving single messages and accepting incoming streams.

    See more

    Declaration

    Swift

    public protocol DittoBusDelegate : AnyObject
  • Chosen reliability level for a Ditto Bus stream

    See more

    Declaration

    Swift

    public enum DittoBusReliability
  • A standalone message received from another peer in the mesh.

    See more

    Declaration

    Swift

    public class DittoBusMessage
  • A message-based communication channel to another peer in the mesh.

    When a DittoBusStream is received by any means, you must immediately set a delegate. This provides the notifications of incoming messages and other events.

    Outgoing messages can be enqueued using enqueueMessage. You must wait for the delegate method indicating that the enqueue was successful before calling this method again. This process provides backpressure so that your app does not send data more quickly than the network can deliver.

    See more

    Declaration

    Swift

    public class DittoBusStream : Identifiable, Equatable, Hashable
  • Callbacks required to use the Ditto Bus API with explicit stream handles.

    See more

    Declaration

    Swift

    public protocol DittoBusStreamDelegate : AnyObject
  • The priority with which the local device should reach out to particular remote peers in the Ditto mesh.

    For most use-cases, this API is not required as Ditto will automatically create an optimal P2P mesh. Certain use-cases, however, might require more manual control over how the mesh is formed.

    See more

    Declaration

    Swift

    public enum DittoConnectionPriority : Int