miso-1.3.0.0: A tasty Haskell front-end framework

Copyright(C) 2016-2018 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
MaintainerDavid M. Johnson <djohnson.m@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Miso.WebSocket

Contents

Description

 
Synopsis

Types

data WebSocket action Source #

WebSocket connection messages

Instances
Eq action => Eq (WebSocket action) Source # 
Instance details

Defined in Miso.WebSocket

Methods

(==) :: WebSocket action -> WebSocket action -> Bool #

(/=) :: WebSocket action -> WebSocket action -> Bool #

Show action => Show (WebSocket action) Source # 
Instance details

Defined in Miso.WebSocket

Methods

showsPrec :: Int -> WebSocket action -> ShowS #

show :: WebSocket action -> String #

showList :: [WebSocket action] -> ShowS #

newtype URL Source #

URL of Websocket server

Constructors

URL MisoString 
Instances
Eq URL Source # 
Instance details

Defined in Miso.WebSocket

Methods

(==) :: URL -> URL -> Bool #

(/=) :: URL -> URL -> Bool #

Show URL Source # 
Instance details

Defined in Miso.WebSocket

Methods

showsPrec :: Int -> URL -> ShowS #

show :: URL -> String #

showList :: [URL] -> ShowS #

newtype Protocols Source #

Protocols for Websocket connection

Constructors

Protocols [MisoString] 
Instances
Eq Protocols Source # 
Instance details

Defined in Miso.WebSocket

Show Protocols Source # 
Instance details

Defined in Miso.WebSocket

data CloseCode Source #

Code corresponding to a closed connection https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent

Constructors

CLOSE_NORMAL

1000, Normal closure; the connection successfully completed whatever purpose for which it was created.

CLOSE_GOING_AWAY

1001, The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.

CLOSE_PROTOCOL_ERROR

1002, The endpoint is terminating the connection due to a protocol error.

CLOSE_UNSUPPORTED

1003, The connection is being terminated because the endpoint received data of a type it cannot accept (for example, a textonly endpoint received binary data).

CLOSE_NO_STATUS

1005, Reserved. Indicates that no status code was provided even though one was expected.

CLOSE_ABNORMAL

1006, Reserved. Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected.

Unsupported_Data

1007, The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., nonUTF8 data within a text message).

Policy_Violation

1008, The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable.

CLOSE_TOO_LARGE

1009, The endpoint is terminating the connection because a data frame was received that is too large.

Missing_Extension

1010, The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't.

Internal_Error

1011, The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.

Service_Restart

1012, The server is terminating the connection because it is restarting.

Try_Again_Later

1013, The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients.

TLS_Handshake

1015, Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).

OtherCode Int

OtherCode that is reserved and not in the range 0999

Instances
Eq CloseCode Source # 
Instance details

Defined in Miso.WebSocket

Show CloseCode Source # 
Instance details

Defined in Miso.WebSocket

Generic CloseCode Source # 
Instance details

Defined in Miso.WebSocket

Associated Types

type Rep CloseCode :: Type -> Type #

type Rep CloseCode Source # 
Instance details

Defined in Miso.WebSocket

type Rep CloseCode = D1 (MetaData "CloseCode" "Miso.WebSocket" "miso-1.3.0.0-2HxP2L1tqeAJbsjB7Kp8io" False) (((C1 (MetaCons "CLOSE_NORMAL" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "CLOSE_GOING_AWAY" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CLOSE_PROTOCOL_ERROR" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "CLOSE_UNSUPPORTED" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CLOSE_NO_STATUS" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "CLOSE_ABNORMAL" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Unsupported_Data" PrefixI False) (U1 :: Type -> Type)))) :+: (((C1 (MetaCons "Policy_Violation" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CLOSE_TOO_LARGE" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Missing_Extension" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Internal_Error" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "Service_Restart" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Try_Again_Later" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "TLS_Handshake" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "OtherCode" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))))

newtype WasClean Source #

Wether or not the connection closed was done so cleanly

Constructors

WasClean Bool 
Instances
Eq WasClean Source # 
Instance details

Defined in Miso.WebSocket

Show WasClean Source # 
Instance details

Defined in Miso.WebSocket

newtype Reason Source #

Reason for closed connection

Constructors

Reason MisoString 
Instances
Eq Reason Source # 
Instance details

Defined in Miso.WebSocket

Methods

(==) :: Reason -> Reason -> Bool #

(/=) :: Reason -> Reason -> Bool #

Show Reason Source # 
Instance details

Defined in Miso.WebSocket