Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype Config = Config {}
- cfgIP :: Config -> String
- cfgPort :: Config -> Int
- cfgPath :: Config -> String
- def :: Default a => a
- newtype ByPattern a = ByPattern Pattern
- data ByType a = ByType
- byTypeRouter :: Type AbsRef -> TypedBLOB
- data ByAny a = ByAny
- byAny :: ByAny TypedBLOB
- data Echo a = Echo {}
- type App a r = Connection a -> IO r
- data Connection a = Connection {}
- inputWithTimeout :: Int -> Connection a -> IO (Maybe a)
- type WSApp r = App ByteString r
- type WSConnection = Connection ByteString
- chatsProtocol :: ByteString
- chatsProtocolT :: Text
- type WSChannelResult = ChannelSelectionResult (WebSocketAddress IP4Address)
- data ChannelSelectionResult addr
- data WebSocketAddress ip = WebSocketAddress {}
- data SocketAddress ip = SocketAddress {
- socketAddress :: HostAddress ip
- socketPort :: HostPort
- data IP4Address = IP4Address Word8 Word8 Word8 Word8
- data IP6Address
- data HostAddress ip
- = IPAddress ip
- | DNSAddress String
- data HostPort = HostPort {}
Top access point configuration
Top's access point configuration
Connection Protocols
A routing protocol specified by a pattern and a type.
Once a connection is established, clients:
- can send messages of the given type
- will receive all messages of the same type, that match the given pattern, sent by other agents
A routing protocol specified by a type.
Once a connection is established, clients:
- can send messages of the given type
- will receive all messages of the same type sent by other agents
byTypeRouter :: Type AbsRef -> TypedBLOB Source #
Return the value of the ByType router identifier for the given type
A routing protocol to receive all messages.
The ByAny type parameter indicates the type of the messages exchanged on the channel (usually:TypedBLOB).
Once a connection is established, clients:
- can send messages of any type, as values of the ByAny type argument (for example: an Int value encoded as the corresponding TypedBLOB value)
- will receive all messages sent by other agents
Echo protocol: any value sent in is returned verbatim to the sender (useful for testing purposes) Client can specify if received messages should be logged (for debugging purposes)
Connection
type App a r = Connection a -> IO r Source #
An application that connects to a channel of type a and eventually returns an IO r
data Connection a Source #
A typed bidirectional connection/channel
inputWithTimeout :: Int -> Connection a -> IO (Maybe a) Source #
Return a value received on the connection or Nothing if no value is received in the specified number of seconds
NOTE: In case of timeout, the connection will be closed.
WebSocket Connection
type WSApp r = App ByteString r Source #
An application that connects to a WebSocket channel of type a and eventually returns an IO r
type WSConnection = Connection ByteString Source #
A WebSocket connection
chatsProtocol :: ByteString Source #
CHATS binary identifier
chatsProtocolT :: Text Source #
CHATS textual identifier
CHATS
data ChannelSelectionResult addr Source #
The value returned by an access point, after receiving a routing channel setup request.
Success | The channel has been permanently setup to the requested protocol |
Failure | The access point is unable or unwilling to open a connection with the requested routing protocol |
RetryAt addr | User should retry with the same transport protocol at the indicated address |
Eq addr => Eq (ChannelSelectionResult addr) Source # | |
Ord addr => Ord (ChannelSelectionResult addr) Source # | |
Show addr => Show (ChannelSelectionResult addr) Source # | |
Generic (ChannelSelectionResult addr) Source # | |
Flat addr => Flat (ChannelSelectionResult addr) Source # | |
Model a => Model (ChannelSelectionResult a) Source # | |
type Rep (ChannelSelectionResult addr) Source # | |
Network Addresses
data WebSocketAddress ip Source #
The full address of a WebSocket endpoint
Eq ip => Eq (WebSocketAddress ip) Source # | |
Ord ip => Ord (WebSocketAddress ip) Source # | |
Show ip => Show (WebSocketAddress ip) Source # | |
Generic (WebSocketAddress ip) Source # | |
Flat ip => Flat (WebSocketAddress ip) Source # | |
Model ip => Model (WebSocketAddress ip) Source # | |
type Rep (WebSocketAddress ip) Source # | |
data SocketAddress ip Source #
The address of a network socket
Eq ip => Eq (SocketAddress ip) Source # | |
Ord ip => Ord (SocketAddress ip) Source # | |
Show ip => Show (SocketAddress ip) Source # | |
Generic (SocketAddress ip) Source # | |
Flat ip => Flat (SocketAddress ip) Source # | |
Model ip => Model (SocketAddress ip) Source # | |
type Rep (SocketAddress ip) Source # | |
data IP4Address Source #
An IP4 address
data IP6Address Source #
An IP6 address
data HostAddress ip Source #
A host address, either an IP or a DNS domain
Eq ip => Eq (HostAddress ip) Source # | |
Ord ip => Ord (HostAddress ip) Source # | |
Show ip => Show (HostAddress ip) Source # | |
Generic (HostAddress ip) Source # | |
Flat ip => Flat (HostAddress ip) Source # | |
Model ip => Model (HostAddress ip) Source # | |
Pretty ip => Pretty (HostAddress ip) Source # | |
type Rep (HostAddress ip) Source # | |
A Sockets port (e.g. 80)