It’s not possible to implement something like:
do
msg <- timeout (10*1000*1000) (receiveData conn)
case msg of
Just msg -> …
Nothing ->
sendTextData conn "timeouted"
threadDelay (1 * 1000 * 1000) -- even with this…
sendClose conn
… the client will never see the "timeouted" message.
It’s not possible to implement something like:
… the client will never see the
"timeouted"message.