Skip to content

Commit 85dd8a0

Browse files
authored
fix(relay): document RelayFull message (fixes #880) (#909)
The RelayFull message indicates that the relay has reached its limits, such as connection limits.
1 parent 5a84e0d commit 85dd8a0

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

specs/relay-v1.rst

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ Temporary protocol submode
8989
^^^^^^^^^^^^^^^^^^^^^^^^^^
9090

9191
A temporary protocol submode begins with ConnectRequest message, to which the
92-
relay responds with either ResponseNotFound if the device the client it is after
93-
is not available, or with a SessionInvitation, which contains the unique session
92+
relay responds with ResponseNotFound if the device the client it is after
93+
is not available, with a RelayFull if the relay has reached its limits,
94+
or with a SessionInvitation, which contains the unique session
9495
key which then can be used to establish a connection in session mode.
9596

9697
The connection is terminated immediately after that.
@@ -125,11 +126,13 @@ Session mode
125126
The first and only message the client sends in the session mode is the
126127
JoinSessionRequest message which contains the session key identifying which
127128
session you are trying to join. The relay responds with one of the following
128-
Response messages:
129+
messages:
129130

130131
1. ResponseNotFound - Session key is invalid
131132
2. ResponseAlreadyConnected - Session is full (both sides already connected)
132133
3. ResponseSuccess - You have successfully joined the session
134+
4. RelayFull - Relay limits are too strict for you to be able to join the session.
135+
The relay immediately terminates the connection after sending this.
133136

134137
After the successful response, all the bytes written and received will be
135138
relayed between the two devices in the session directly.
@@ -372,6 +375,19 @@ SessionInvitation message (Type = 6)
372375
the invitation which is sent to the other device, so that there is always
373376
one client socket, and one server socket.
374377

378+
RelayFull message (Type = 7)
379+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
380+
381+
::
382+
383+
0 1 2 3
384+
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
385+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
386+
387+
388+
struct RelayFull {
389+
}
390+
375391
How Syncthing uses relays, and general security
376392
-----------------------------------------------
377393

0 commit comments

Comments
 (0)