tcp Binding
tcp Binding
Zilla runtime tcp binding.
tcp_server:
type: tcp
kind: server
options:
host: 0.0.0.0
port: 12345
exit: echo_server
Summary
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.
Configuration
Properties
* required
kind*
enum[ "client", "server" ]
Behave as a tcp client or server.
options
object
tcp-specific options.
options:
host: 0.0.0.0
port: 12345
options.host
string
Hostname or IP address.
options.port
integer|string|arrayofinteger|arrayofstring
Port number(s), including port number ranges.
exit
string
Default exit binding when no conditional routes are viable, for kind server only.
exit: echo_server
routes
arrayofobject
Conditional tcp-specific routes.
routes[].guarded
objectas named map ofstring:stringarray
List of roles required by each named guard to authorize this route.
routes[].when
arrayofobject
List of conditions (any match) to match this route.
Read more: When a route matches
when[].authority
string
Associated authority.
when[].cidr
string
CIDR mask.
when[].port
integer|string|arrayofinteger|arrayofstring
Port number(s), including port number ranges.
routes[].exit*
string
Next binding when following this route, for kind server only.
routes:
- when:
...
exit: echo_server
* required

