<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="Cambria"><br>
i'm building a web app using cowboy with mnesia as persistent
storage.<br>
the current version uses http (may move to websockets in the
future).<br>
<br>
during the lifetime of a user's session, i need to maintain
per-user state that is available to all route handlers.<br>
i plan to initialize this state when a user logs in and write
parts of it to persistent storage when the session ends.<br>
sessions can terminate because of the user logging out or because
of a connection timeout.<br>
<br>
if a user logs out, then my javascript can hit a route which can
write persistent storage.<br>
if the connection times out, i need to get a message (presumably
from cowboy or ranch) to one of my processes so that it can write
persistent storage.<br>
<br>
i scoured the documentation for cowboy and ranch but didn't find
any mention of a mechanism to receive a message on connection
timeout.<br>
<br>
any help would be appreciated.<br>
thanx.<br>
</font><br>
</body>
</html>