Concept: General Procedures

Back to overview

General procedures that need to be followed.

Description

Establishing a Connection

The remote client connects to the Threema mobile app using the SaltyRTC protocol. The following SaltyRTC tasks are supported, depending on the mobile platform:

To establish a connection, the remote client needs to provide a QR code to the apps, containing the connection information. The format is currently described in the Threema Web source code.

Initial Handshake

After the handshake has been completed, the app SHALL auto-subscribe the following messages towards the client:

The remote client SHALL auto-subscribe the following messages towards the app:

In addition, the remote client SHOULD request initial data by sending the following requests:

Maintaining Chunk Order

After a SaltyRTC close message has been received, all subsequent messages MUST be discarded. Furthermore, usage of the SaltyRTC application message is forbidden when the SaltyRTC task v0.relayed-data.tasks.saltyrtc.org is being used. This guarantees us that no SaltyRTC client-to-client messages can be received in between any specific messages of this protocol.

Note: We are planning to remove this restriction with a new SaltyRTC version that supports multiple channels. This would also allow us to move meta messages, such as the ones prefixed by connection*, into a different channel.