The websockets library allows passing an AcceptRequest when upgrading the request to websockets, which at the moment only contains the subprotocol to use with the client. The list of subprotocols that the client is prepared to speak is in the RequestHead. |
||
|---|---|---|
| .. | ||
| Yesod | ||
| ChangeLog.md | ||
| chat-with-timeout-control.hs | ||
| chat.hs | ||
| LICENSE | ||
| README.md | ||
| sample.hs | ||
| Setup.hs | ||
| yesod-websockets.cabal | ||
REQUIRED PACKAGES
The example, chat.hs, requires stm-lifted and conduit-combinators
which are not dependencies of yesod-websockets. Installing the extra
packages needed for the chat.hs example can be installed with the
command:
$ cabal install stm-lifted conduit-combinators
TIMEOUTS
Versions of yesod-websockets prior to 0.2.1 may experience session
timeouts after about 30 seconds of inactivity. Refer to the patch in
the websockets library which addresses this issue: