WebRTC: {
    methods: {
        startDataChannel: {
            I: typeof StartDataChannelRequest;
            O: typeof DataChannelOffer;
            kind: BiDiStreaming;
            name: "StartDataChannel";
        };
        startSignalChannel: {
            I: typeof WebRTCSignal;
            O: typeof WebRTCSignal;
            kind: BiDiStreaming;
            name: "StartSignalChannel";
        };
    };
    typeName: "v1.WebRTC";
} = ...

WebRTC is a service for negotiating WebRTC connections to nodes in the mesh. It is typically run alongside a TURN server, however the server can be configured to use public STUN servers instead.

Type declaration

  • Readonly methods: {
        startDataChannel: {
            I: typeof StartDataChannelRequest;
            O: typeof DataChannelOffer;
            kind: BiDiStreaming;
            name: "StartDataChannel";
        };
        startSignalChannel: {
            I: typeof WebRTCSignal;
            O: typeof WebRTCSignal;
            kind: BiDiStreaming;
            name: "StartSignalChannel";
        };
    }
    • Readonly startDataChannel: {
          I: typeof StartDataChannelRequest;
          O: typeof DataChannelOffer;
          kind: BiDiStreaming;
          name: "StartDataChannel";
      }

      StartDataChannel requests a new WebRTC connection to a node. The client speaks first with the request containing the node ID and where forwarded packets should be sent. The server responds with an offer and STUN servers to be used to establish a WebRTC connection. The client should then respond with an answer to the offer that matches the spec of the DataChannel.CHANNELS enum value.

      After the offer is accepted, the stream can be used to exchange ICE candidates to speed up the connection process.

      Generated

      from rpc v1.WebRTC.StartDataChannel

    • Readonly startSignalChannel: {
          I: typeof WebRTCSignal;
          O: typeof WebRTCSignal;
          kind: BiDiStreaming;
          name: "StartSignalChannel";
      }

      StartSignalChannel starts a signaling channel to a remote node. This can be used to negotiate WebRTC connections both inside and outside of the mesh. Messages on the wire are proxied to the remote node.

      Generated

      from rpc v1.WebRTC.StartSignalChannel

      • Readonly I: typeof WebRTCSignal
      • Readonly O: typeof WebRTCSignal
      • Readonly kind: BiDiStreaming
      • Readonly name: "StartSignalChannel"
  • Readonly typeName: "v1.WebRTC"

Generated

from service v1.WebRTC

Generated using TypeDoc