HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulevortex-ws-0.2.1GHC2024

Vortex.Ws.Door

The door a public websocket needs, in front of a host's sessions: a socket systemd holds (or one bound here), a handshake within a deadline from a page the settings name, a session slot for the door and for the peer, and frames held to a size with compression off. The peer is the connecting address, or behind a proxy its X-Real-IP, with an IPv6 address counted by its /64. Its settings are a vortex program (Vortex.Ws.Door.Settings), settled ahead of time and read back here.

  • 2 types
  • 8 values
  • Packagevortex-ws-0.2.1
  • Exports10
  • LanguageGHC2024
  • LicenceBSD-3-Clause
  • SourceDoor.hs

Where the door listens

3 declarations
datadata Listen
#

Where the door listens: a unix socket bound here or handed over by systemd, for a proxy in front, or a loopback TCP port, for development.

valueactivated :: IO Socket
#

The one listening socket systemd hands over; anything else is a mistake in the unit, and fails.

Serving

6 declarations
valueserveDoorOn
  1. :: DoorSettings
  2. -> Gate
  3. -> Behind
  4. -> Socket
  5. -> Peer -> Session -> IO ()
  6. -> IO ()
#

Serve on a socket already listening. A connection that does not finish its handshake in time is closed; one from a page the settings do not name is answered 403, and one past a session cap 503, without a Session.

datadata Behind
#

Where a connection's peer is read from.

Constructors

  • BehindProxy

    The proxy's X-Real-IP; a connection without one is the peer proxy.

  • Direct

    The connecting address.

Instances2Eq, Show
  • Eq BehindDefined in vortex-ws-0.2.1 · Vortex.Ws.Door
  • Show BehindDefined in vortex-ws-0.2.1 · Vortex.Ws.Door

Settings

1 declaration