Module

Sparrow.Types

Package
purescript-sparrow
Repository
athanclark/purescript-sparrow

This module defines the data types used by the protocol over the wire, and the definition of a user-level "client" that can handle a fully specified initIn, initOut, deltaIn and deltaOut transmission schema for a topic. Generally this module should be considered "internal".

#ClientReturn Source

type ClientReturn initOut deltaIn = { initOut :: initOut, sendCurrent :: deltaIn -> Effect Unit, unsubscribe :: Effect Unit }

#ClientArgs Source

type ClientArgs initIn initOut deltaIn deltaOut = { initIn :: initIn, onReject :: Effect Unit, receive :: ClientReturn initOut deltaIn -> deltaOut -> Effect Unit }

#Client Source

type Client initIn initOut deltaIn deltaOut = (ClientArgs initIn initOut deltaIn deltaOut -> (Maybe (ClientReturn initOut deltaIn) -> Effect (Maybe (Fiber Unit))) -> Effect Unit) -> Effect Unit

#staticClient Source

staticClient :: forall initOut initIn. ((initIn -> (Maybe initOut -> Effect Unit) -> Effect Unit) -> Effect Unit) -> Client initIn initOut JSONVoid JSONVoid

#topicToPath Source

#WithSessionID Source

newtype WithSessionID a

Constructors

Instances

#WithTopic Source

newtype WithTopic a

Constructors

Instances

#WSIncoming Source

data WSIncoming a

Constructors

Instances