On this page:

2.2 WebSocket Servers

(ws-listener? v)  any
  v : any/c
Checks whether the given value v is a WebSocket listener.

(ws-listen port    
  host])  ws-listener?
  port : (and/c exact-nonnegative-integer? (integer-in 0 65535))
  protocols : (listof string?) = '()
  ssl-context : (or/c ssl-server-context? #f)
  max-queue : exact-nonnegative-integer? = 4
  reuse? : any/c = #f
  host : (or/c string? #f) = #f
Starts listening for incoming WebSocket connections on the given TCP port. protocols is the list of WebSocket protocol strings that will be accepted if requested by the client. A connection without any specified protocol is always acceptable.

The ssl-context specifies whether the server will accept plain TCP connections or encrypted connections. If it is #f, a plain TCP listener is used, otherwise the argument is passed on to ssl-listen to control the setup of the SSL engine.

The arguments max-queue, reuse? and host are passed on to tcp-listen or ssl-listen as appropriate.

(ws-accept listener)  ws-socket?
  listener : ws-listener?
Accepts an incoming WebSocket connection on listener and returns a WebSocket that can be used to obtain information about the connection, such as the connection URL and protocol, and to communicate with the client.