The first step in setting up a switchboard is for the game server to register itself with the switchboard by sending a request on startup. That part is external to us - that's not handled within the game program but rather within the web server script that launches the game. Here, then, we simply assume that this work is already done.
The second step is that the switchboard needs to check back with the game server from time to time to see if it's still alive - essentially a "ping" operation. We handle that here: if we respond to the request, we're obviously still alive.
The third step is that we need to send the switchboard a URL that lets secondary users ("guests") connect to the game session. We handle that here as well: our reply body is the client connection URL.
guestConnectPage : WebResource