On connect request
I This condition is triggered as soon as a connection request is made and a Lacewing Connect Request was sent.
The incoming connection is auto-selected as a client.
This occurs at step 3 in the connection handshake.
Any connection that is not Lacewing will be disconnect before step 3 will be kicked with an On error event, with the error message including the IP. Connection > On disconnect will not run for those, as there is no client yet.
A UDP bug is present in Relay that will prevent connections ever completing (even if the connection is approved), but this bug is fixed in Blue.
This condition can be disabled for efficiency
To change the mode in Blue Server, use the Enable/disable conditions > On connect request action. You should do this before you start hosting, to avoid a fast client managing to outrace your server.
Changing the mode while a server is live is safe to do.
In Relay Server, this condition cannot be disabled.
Possible responses
The responses can be set to happen automatically in Blue via the Enable/disable conditions > On connect request action.
In Relay, the connect request events are always run and must finish before a response is sent.
Events can choose one of two responses:
- Use On interactive condition > Deny (on [..] request); but be aware clients can make themselves leave by disconnecting from the server.
If you choose to deny in that event, it will not trigger an Connection > On disconnect event when they are disconnected; so you will get an On connect, but no disconnect.
This is because you have considered the client already disconnected by this event, so there is no need to set up data for their connection, so there should be no need to remove the data, either. - If no interactive action is run, the request is approved, and the client is sent a Connect OK response (step 4 of the connection handshake).