4. Transports and Clients

connection

Version

Configuration for low-level socket behavior of Membrane's HTTP client. This includes timeouts and local address binding for outbound connections. Typically used as a child of <httpClientConfig>. XML Example: <connection keepAliveTimeout="30000" timeout="10000" soTimeout="5000" localAddr="192.168.1.100"/> YAML (experimental):
connection:
                keepAliveTimeout: 30000
                timeout: 10000
                soTimeout: 5000
                localAddr: "192.168.1.100"

Syntax

connection:
keepAliveTimeout: <number>
localAddr: <string>
soTimeout: <number>
timeout: <number>
connection:
  keepAliveTimeout: <number>
  localAddr: <string>
  soTimeout: <number>
  timeout: <number>

Attributes

NameRequiredDefaultDescriptionExamples
keepAliveTimeoutfalse4000Time in milliseconds before an idle connection is closed and removed from the connection pool. Should be less than the server-side keep-alive timeout. If a response includes a "Keep-Alive" header, that value overrides this setting.30000
localAddrfalse(not set)IP address of the local network interface to use for outbound connections. Useful in multi-homed environments.192.168.1.42
soTimeoutfalse0Read timeout in milliseconds. Applies to reading from the socket after the connection is established. A value of 0 means infinite timeout.10000
timeoutfalse10000Maximum time in milliseconds to wait when establishing a TCP connection. A value of 0 may block indefinitely depending on the system.5000

Can be used in