Ditto JS SDK v5.0.0
    Preparing search index...

    Type Alias Connection

    Represents a connection between two peers in a Ditto mesh network.

    type Connection = {
        connectionType: ConnectionType;
        id: string;
        peer1: string;
        peer2: string;
    }
    Index

    Properties

    connectionType: ConnectionType

    Type of transport enabling this connection.

    id: string

    Unique identifier for the connection.

    This ID is deterministic for any two peers and a given connection type.

    Example ID

    "1<->2:Bluetooth"

    peer1: string

    The peer key of the peer at one end of the connection.

    The assignment to peer1 and peer2 is deterministic and stable for any two peers.

    peer2: string

    The peer key of the peer at the other end of the connection.

    The assignment to peer1 and peer2 is deterministic and stable for any two peers.