Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Network.TypedProtocol.PingPong.Examples
Synopsis
- pingPongServerStandard :: Applicative m => PingPongServer m ()
- pingPongServerCount :: Applicative m => PingPongServer m Int
- pingPongClientFlood :: Applicative m => PingPongClient m a
- pingPongClientCount :: Applicative m => Int -> PingPongClient m ()
- pingPongClientPipelinedMax :: forall m. Monad m => Int -> PingPongClientPipelined m [Either Int Int]
- pingPongClientPipelinedMin :: forall m. Monad m => Int -> PingPongClientPipelined m [Either Int Int]
- pingPongClientPipelinedLimited :: forall m. Monad m => Int -> Int -> PingPongClientPipelined m [Either Int Int]
Documentation
pingPongServerStandard :: Applicative m => PingPongServer m () Source #
The standard stateless ping-pong server instance.
pingPongServerCount :: Applicative m => PingPongServer m Int Source #
An example ping-pong server instance that counts the number of ping messages.
pingPongClientFlood :: Applicative m => PingPongClient m a Source #
An example ping-pong client that sends pings as fast as possible forever‽
This may not be a good idea‼
pingPongClientCount :: Applicative m => Int -> PingPongClient m () Source #
An example ping-pong client that sends a fixed number of ping messages and then stops.
pingPongClientPipelinedMax :: forall m. Monad m => Int -> PingPongClientPipelined m [Either Int Int] Source #
A pipelined ping-pong client that sends eagerly rather than waiting to collect any replies. This is maximum pipelining in some sense, and correspondingly it gives minimum choice to the environment (drivers).
It returns the interleaving of ping indexes sent, and collected.
pingPongClientPipelinedMin :: forall m. Monad m => Int -> PingPongClientPipelined m [Either Int Int] Source #
A pipelined ping-pong client that sends eagerly but always tries to collect any replies if they are available. This allows pipelining but keeps it to a minimum, and correspondingly it gives maximum choice to the environment (drivers).
It returns the interleaving of ping indexes sent, and collected.
pingPongClientPipelinedLimited :: forall m. Monad m => Int -> Int -> PingPongClientPipelined m [Either Int Int] Source #
A pipelined ping-pong client that sends eagerly up to some maximum limit of outstanding requests. It is also always ready to collect any replies if they are available. This allows limited pipelining and correspondingly limited choice to the environment (drivers).
It returns the interleaving of ping indexes sent, and collected.