Allocating, binding, and joining
Understand the three distinct steps for establishing a Relay connection between players.
Read time 2 minutesLast updated 14 hours ago
Allocating, binding, and joining are three distinct concepts in the Relay connection flow.
Allocating
Allocating is when a host player tells the Allocations service about their intent to connect to a Relay server, and the Allocations service reserves slots on a Relay server. When the Allocations service reserves slots on a Relay server, it prepares the Relay server for players to bind (establish a network connection). The number of slots depends on the maximum number of connections specified in the allocation request. Check out the following steps in the connection flow:- The host player requests an allocation
- The Allocations service selects a Relay server
- The Allocations service sends the connection data to the host player
Binding
Binding is when the player establishes a connection with the Relay server that the Allocations service reserved for the player during the allocating process. After the player completes the binding process, the Relay server can discover the player’s IP address and exchange packets.
A
BIND
Check out the following steps in the connection flow:
Joining
Joining is when a joining player joins the host player’s allocation on a Relay server. After the joining player completes the joining process, they can exchange messages with the host player. Allocating and joining are similar processes. The primary difference is that the join API response has the host connection data.
Check out the following steps in the connection flow: