binding (tcp)
Zilla runtime tcp binding
Defines a binding with
tcp
protocol support, with server
or client
behavior.The
server
kind tcp
binding listens for inbound socket connections, producing higher level application streams for each remote tcp
client.The
client
kind tcp
binding receives inbound application streams and initiates outbound tcp
network connections to a remote tcp
server address.Conditional routes based on the hostname authority and network address mask are used to route these streams to an
exit
binding."tcp_server0":
{
"type" : "tcp",
"kind": "server",
"options":
{
"host": "0.0.0.0",
"port": 12345
},
"exit": "echo_server0"
}
Binding with support for
tcp
protocol.Name (* = required) | Type | Description |
---|---|---|
type * | const "tcp" | Support tcp protocol |
kind * | enum [
"client",
"server" ] | Behave as a tcp client or server |
object | tcp -specific options | |
routes | Conditional tcp -specific routes | |
exit | string | Default exit binding when no conditional routes are viable, for kind server only |
Options for
tcp
protocol.Name (* = required) | Type | Description |
---|---|---|
host | string | Hostname or IP address |
port | integer |
string |
array of integer |
array of string | Port number(s), including port number ranges. |
Routes for
tcp
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, for kind server only |
Conditions to match routes for
tcp
protocol.Name (* = required) | Type | Description |
---|---|---|
authority | string | Associated authority |
cidr | string | CIDR mask |
Last modified 9mo ago