Closed mystiker closed 2 months ago
Further information after implementation:
The timeout can be configured using the SOCKET_TIMEOUT
environment variable and defaults to 15 minutes
The frontend will try to reconnect as many times as possible.
After SOCKET_TIMEOUT minutes, the mud connection gets closed by the backend (which transforms the player into a statue) and the client will no longer be able to reestablish the old connection.
To have a better visibility, the mud-input gets changed based on its connection status. The frontend does connect by itself and the menu has been removed (for now).
The connection backend<->mud should stay alive for 30 minutes (this value should be configurable) after the client has been disconnected. Every message should be buffered and delivered to the client after reconnect. The timer resets upon reconnect.
If the MUD chooses to close the connection, or the connection expires after 30 minutes, the backend should inform the client of this event. If the client is not connected, it should get this information upon reconnect.
After more time has passed (another 30 minutes), the disconnected client connection will be destroyed and all messages will be lost.
The frontend should not have a "connect" button any longer and should connect/reconnect by itself based on its state.