How does the gateway distinguish a Client Restart from a Reconnection?
• Disconnection handshake : When a client shuts down, it performs a handshake before disconnecting from the gateway • Bearer-level signalling : For connection-oriented bearers like TCP, the disconnection can be spotted at the socket level • Gateway-side session storage : The Gateway stores existing sessions on the local storage. When a new sessionId is encountered, the Gateway first checks in this storage, to check if the same client (sessionId) had connected before.