binding (ws)
Zilla runtime ws binding
Defines a binding with
WebSockets
protocol support, with server
or client
behavior.The
server
kind ws
binding converts inbound http
request-response streams into ws
full-duplex streams.Conditional routes based on
ws
scheme, authority, path or negotiated subprotocol are used to route these streams to an exit
binding.The
client
kind ws
binding converts inbound ws
full duplex streams into http
request-response streams.Conditional routes based on
ws
scheme, authority, path or negotiated subprotocol are used to route these streams to an exit
binding."ws_server0":
{
"type" : "ws",
"kind": "server",
"routes":
[
{
"when":
[
{
"protocol": "echo"
}
],
"exit": "echo_server0"
}
]
}
Binding with support for
ws
protocol.Options for
ws
protocol.Name (* = required) | Type | Description |
---|---|---|
object | Defaults |
Defaults option for
ws
protocol.Name (* = required) | Type | Description |
---|---|---|
protocol | string | Subprotocol |
scheme | string | Scheme |
authority | string | Authority |
path | string | Path |
Routes for
ws
protocol.Name (* = required) | Type | Description |
---|---|---|
guarded | object as named map of string array | List of roles required by each named guard to authorize this route |
when | List of conditions (any match) to match this route | |
exit * | string | Next binding when following this route |
Conditions to match routes for
ws
protocol.Name (* = required) | Type | Description |
---|---|---|
protocol | string | Subprotocol pattern |
scheme | string | Scheme pattern |
authority | string | Authority pattern |
path | string | Path pattern |
Last modified 10mo ago