Skip to content

File SolidSyslogTcpConnectTimeoutFunction.h

FileList > Core > Interface > SolidSyslogTcpConnectTimeoutFunction.h

The callback typedef the integrator installs on a TCP stream config to supply the bounded-connect deadline per attempt (runtime-tunable).

  • #include <stdint.h>
  • #include "SolidSyslogExternC.h"

Public Types Documentation

SolidSyslogTcpConnectTimeoutFunction

Returns the bounded-connect deadline in milliseconds, at most SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS_MAX.

typedef uint32_t(* SolidSyslogTcpConnectTimeoutFunction) (void *context);

Called at the start of every connect attempt, so a runtime-tunable value (e.g. commissioning-time NVRAM read, live web-UI override) takes effect on the next reconnect without rebuilding or destroying the stream. context is passed through unchanged from the config slot the integrator installed it on.


Macro Definition Documentation

SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS_MAX

The longest deadline a stream honours for one connect attempt, in milliseconds: five minutes.

#define SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS_MAX `300000U`

A getter answering more is bounded to this, not rejected. The servicing task blocks for the whole of an attempt, and every stack gives up on an unanswered SYN well inside this, so a longer value could only stall the task without changing the outcome. The figure also keeps the conversion to a stack's own units within 32-bit signed arithmetic on every target.



The documentation for this class was generated from the following file Core/Interface/SolidSyslogTcpConnectTimeoutFunction.h