Skip to content
Florian König edited this page Oct 19, 2022 · 9 revisions

WebSocket: wss://chess-backend-z5zcxlf3rq-ew.a.run.app/

To connect two clients (host and attendee):

  1. To determine the host, send

    {"type": "connect-host"}
  2. From the other client: Using the returned hostId, request to connect the attendee

    {
      "type": "connect-attendee", 
      "host": "$HOST",
      "code": "$CODE"
    }
  3. From the host, verify the provided code

    {
      "type": "accept-attendee-request", 
      "clientId": "$CLIENT",
    }

    Alternatively, you can decline the request

    {
      "type": "decline-attendee-request", 
      "clientId": "$CLIENT",
    }
Clone this wiki locally