How to detect connection issues during connection to dedicated server?


I’m having trouble finding a notification of any connection issues for the client during gameplay on a dedicated server.

For example; the game is built and a dedicated server is running on a Linux machine. I connect as a client and play the game, the connection is lost, but I’m able to keep playing the game. Any other clients connected freeze or keep running (the last known direction, replication, something something).

What I’d like is instead to disconnect the player, show a “Lost connection”-message and bump the player back to the login screen.

Is this possible? And if so, can I also access information such as current ping, etc?

Thanks in advance!