symbiote-0.0.5: Data serialization, communication, and operation verification implementation

Copyright(c) 2019 Athan Clark
LicenseBSD-3-Style
Maintainerathan.clark@gmail.com
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Test.Serialization.Symbiote.WebSocket

Description

Use these functions to communicate over a WebSocket as your peer-to-peer communication mechanism.

Documentation

secondPeerWebSocketLazyByteString Source #

Arguments

:: MonadIO m 
=> MonadBaseControl IO m stM 
=> MonadCatch m 
=> Extractable stM 
=> WebSocketParams 
-> Debug 
-> SymbioteT ByteString m ()

Tests registered

-> m () 

firstPeerWebSocketLazyByteString Source #

Arguments

:: MonadIO m 
=> MonadBaseControl IO m stM 
=> MonadCatch m 
=> Extractable stM 
=> WebSocketParams 
-> Debug 
-> SymbioteT ByteString m ()

Tests registered

-> m () 

secondPeerWebSocketByteString Source #

Arguments

:: MonadIO m 
=> MonadBaseControl IO m stM 
=> MonadCatch m 
=> Extractable stM 
=> WebSocketParams 
-> Debug 
-> SymbioteT ByteString m ()

Tests registered

-> m () 

firstPeerWebSocketByteString Source #

Arguments

:: MonadIO m 
=> MonadBaseControl IO m stM 
=> MonadCatch m 
=> Extractable stM 
=> WebSocketParams 
-> Debug 
-> SymbioteT ByteString m ()

Tests registered

-> m () 

secondPeerWebSocketJson Source #

Arguments

:: MonadIO m 
=> MonadBaseControl IO m stM 
=> MonadCatch m 
=> Extractable stM 
=> WebSocketParams 
-> Debug 
-> SymbioteT Value m ()

Tests registered

-> m () 

firstPeerWebSocketJson Source #

Arguments

:: MonadIO m 
=> MonadBaseControl IO m stM 
=> MonadCatch m 
=> Extractable stM 
=> WebSocketParams 
-> Debug 
-> SymbioteT Value m ()

Tests registered

-> m () 

peerWebSocketLazyByteString Source #

Arguments

:: MonadIO m 
=> MonadBaseControl IO m stM 
=> MonadCatch m 
=> Extractable stM 
=> Show (them ByteString) 
=> Serialize (me ByteString) 
=> Serialize (them ByteString) 
=> WebSocketParams 
-> Debug 
-> ((me ByteString -> m ()) -> m (them ByteString) -> (Topic -> m ()) -> (Failure them ByteString -> m ()) -> (Topic -> Float -> m ()) -> SymbioteT ByteString m () -> m ()) 
-> SymbioteT ByteString m ()

Tests registered

-> m () 

peerWebSocketByteString Source #

Arguments

:: MonadIO m 
=> MonadBaseControl IO m stM 
=> MonadCatch m 
=> Extractable stM 
=> Show (them ByteString) 
=> Serialize (me ByteString) 
=> Serialize (them ByteString) 
=> WebSocketParams 
-> Debug 
-> ((me ByteString -> m ()) -> m (them ByteString) -> (Topic -> m ()) -> (Failure them ByteString -> m ()) -> (Topic -> Float -> m ()) -> SymbioteT ByteString m () -> m ())

Encode and send, receive and decode, on success, on failure, on progress, and test set

-> SymbioteT ByteString m ()

Tests registered

-> m () 

peerWebSocketJson Source #

Arguments

:: MonadIO m 
=> MonadBaseControl IO m stM 
=> Extractable stM 
=> Show (them Value) 
=> ToJSON (me Value) 
=> FromJSON (them Value) 
=> WebSocketParams 
-> Debug 
-> ((me Value -> m ()) -> m (them Value) -> (Topic -> m ()) -> (Failure them Value -> m ()) -> (Topic -> Float -> m ()) -> SymbioteT Value m () -> m ())

Encode and send, receive and decode, on success, on failure, on progress, and test set

-> SymbioteT Value m ()

Tests registered

-> m ()