Module

SockJS.Server

Package
purescript-sockjs-node
Repository
FruitieX/purescript-sockjs-node

#Server Source

data Server :: Type

SockJS server object

#Connection Source

data Connection :: Type

SockJS connection object

#Message Source

type Message = String

SockJS message that can be transmitted over a connection

#Prefix Source

type Prefix = String

Prefix passed to sockjsServer.installHandlers

#createServer_ Source

createServer_ :: forall e. Eff e Server

#installHandlers_ Source

#onConnection_ Source

#end_ Source

end_ :: forall e. EffFn1 e Connection Unit

#onClose_ Source

onClose_ :: forall e. EffFn2 e Connection (Eff e Unit) Unit

#createServer Source

createServer :: forall e. Eff e Server

#installHandlers Source

installHandlers :: forall e. Server -> Server -> Prefix -> Eff e Unit

Installs SockJS' handlers into given Node.Server instance

#onConnection Source

onConnection :: forall e. Server -> (Connection -> Eff e Unit) -> Eff e Unit

Attaches a connection event handler to a Server

#write Source

write :: forall e. Connection -> Message -> Eff e Unit

Write a message over a Connection

#end Source

end :: forall e. Connection -> Eff e Unit

Close a Connection

#onData Source

onData :: forall e. Connection -> (Message -> Eff e Unit) -> Eff e Unit

Attaches a data event handler to a Connection

#onClose Source

onClose :: forall e. Connection -> Eff e Unit -> Eff e Unit

Attaches a close event handler to a Connection

Modules
SockJS.Server