WSRoute

a WebSocket route entry. The handler receives a WSEvent, the captured path parameters, and a WebSocket handle for sending responses. The protocols field lists the subprotocols that this route supports (RFC 6455 ยง4.2.2). An empty list means no subprotocol negotiation.

copy

instantiate

(Fn [(Ref WSRoute a)] WSRoute)

copies a WSRoute.

delete

instantiate

(Fn [WSRoute] ())

deletes a WSRoute. Should usually not be called manually.

handler

instantiate

(Fn [(Ref WSRoute a)] (Ref (Fn [(Ref WSEvent b), (Ref (Map String String) c), (Ref WebSocket d)] ()) a))

gets the handler property of a WSRoute.

init

instantiate

(Fn [String, (Array String), (Fn [(Ref WSEvent a), (Ref (Map String String) b), (Ref WebSocket c)] ())] WSRoute)

creates a WSRoute.

pattern

instantiate

(Fn [(Ref WSRoute a)] (Ref String a))

gets the pattern property of a WSRoute.

prn

instantiate

(Fn [(Ref WSRoute a)] String)

converts a WSRoute to a string.

protocols

instantiate

(Fn [(Ref WSRoute a)] (Ref (Array String) a))

gets the protocols property of a WSRoute.

set-handler

instantiate

(Fn [WSRoute, (Fn [(Ref WSEvent a), (Ref (Map String String) b), (Ref WebSocket c)] ())] WSRoute)

sets the handler property of a WSRoute.

set-handler!

instantiate

(Fn [(Ref WSRoute a), (Fn [(Ref WSEvent b), (Ref (Map String String) c), (Ref WebSocket d)] ())] ())

sets the handler property of a WSRoute in place.

set-pattern

instantiate

(Fn [WSRoute, String] WSRoute)

sets the pattern property of a WSRoute.

set-pattern!

instantiate

(Fn [(Ref WSRoute a), String] ())

sets the pattern property of a WSRoute in place.

set-protocols

instantiate

(Fn [WSRoute, (Array String)] WSRoute)

sets the protocols property of a WSRoute.

set-protocols!

instantiate

(Fn [(Ref WSRoute a), (Array String)] ())

sets the protocols property of a WSRoute in place.

str

instantiate

(Fn [(Ref WSRoute a)] String)

converts a WSRoute to a string.

update-handler

instantiate

(Fn [WSRoute, (Ref (Fn [(Fn [(Ref WSEvent a), (Ref (Map String String) b), (Ref WebSocket c)] ())] (Fn [(Ref WSEvent a), (Ref (Map String String) b), (Ref WebSocket c)] ()) d) e)] WSRoute)

updates the handler property of a WSRoute using a function f.

update-pattern

instantiate

(Fn [WSRoute, (Ref (Fn [String] String a) b)] WSRoute)

updates the pattern property of a WSRoute using a function f.

update-protocols

instantiate

(Fn [WSRoute, (Ref (Fn [(Array String)] (Array String) a) b)] WSRoute)

updates the protocols property of a WSRoute using a function f.