mmm-0.1.0.0: Minecraft 1.21.4 implementation in Haskell
LicenseBSD-3-Clause
Safe HaskellNone
LanguageGHC2021

M.IO.KeepAlive

Description

This module implements the Minecraft protocol's keep-alive mechanism, which helps detect stale connections by periodically exchanging random numbers.

Synopsis

Types

data KeepAliveFail a Source #

keep-alive failure modes. Occurs when:

Constructors

KeepAliveFail 

Fields

  • a

    sent

  • a

    received

KeepAliveTimeout 

Instances

Instances details
(Typeable a, Show a) => Exception (KeepAliveFail a) Source # 
Instance details

Defined in M.IO.KeepAlive

Show a => Show (KeepAliveFail a) Source # 
Instance details

Defined in M.IO.KeepAlive

Eq a => Eq (KeepAliveFail a) Source # 
Instance details

Defined in M.IO.KeepAlive

Keep-alive functions

skeepalive :: forall a (es :: [Effect]) void. (Concurrent :> es, Talking' es, IOE :> es, Random a, Show a, Eq a, Pack a, Unpack a, Typeable a) => Eff es void Source #

server's keep-alive mechanism. sends a random number every 15 seconds and verifies the client echoes it back correctly

throws: