Document of c-modernization-kit (porter) 1.0.0
Loading...
Searching...
No Matches
potrHealthThread.h File Reference

ヘルスチェックスレッド内部ヘッダー。 More...

#include "../potrContext.h"
Include dependency graph for potrHealthThread.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int potr_health_thread_start (struct PotrContext_ *ctx)
 非 TCP ヘルスチェックスレッドを起動します。
int potr_health_thread_stop (struct PotrContext_ *ctx)
 非 TCP ヘルスチェックスレッドを停止します。
int potr_tcp_health_thread_start (struct PotrContext_ *ctx, int path_idx)
 TCP ヘルスチェックスレッドを path ごとに起動します。
int potr_tcp_health_thread_stop (struct PotrContext_ *ctx, int path_idx)
 TCP ヘルスチェックスレッドを停止します。

Detailed Description

ヘルスチェックスレッド内部ヘッダー。

Author
c-modernization-kit sample team
Date
2026/03/08
Version
1.0.0

送信者が定周期で PING パケットを送信するスレッドの起動・停止 API。

Definition in file potrHealthThread.h.

Function Documentation

◆ potr_health_thread_start()

int potr_health_thread_start ( struct PotrContext_ * ctx)
extern

非 TCP ヘルスチェックスレッドを起動します。

Parameters
[in,out]ctxセッションコンテキストへのポインタ。
Returns
成功時は POTR_SUCCESS、失敗時は POTR_ERROR を返します。

ctx->global.health_interval_ms が 0 の場合は起動しません (POTR_SUCCESS を返します)。

Definition at line 526 of file potrHealthThread.c.

References PotrContext_::global, PotrGlobalConfig::health_interval_ms, PotrContext_::health_mutex, PotrContext_::health_running, PotrContext_::health_thread, health_thread_func(), PotrContext_::health_wakeup, POTR_ERROR, POTR_LOG, POTR_SUCCESS, POTR_TRACE_ERROR, POTR_TRACE_VERBOSE, PotrContext_::service, and PotrServiceDef::service_id.

Referenced by potrOpenService().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ potr_health_thread_stop()

int potr_health_thread_stop ( struct PotrContext_ * ctx)
extern

非 TCP ヘルスチェックスレッドを停止します。

Parameters
[in,out]ctxセッションコンテキストへのポインタ。
Returns
成功時は POTR_SUCCESS、失敗時は POTR_ERROR を返します。

Definition at line 584 of file potrHealthThread.c.

References PotrContext_::health_mutex, PotrContext_::health_running, PotrContext_::health_thread, PotrContext_::health_wakeup, POTR_ERROR, and POTR_SUCCESS.

Referenced by potrCloseService(), and potrOpenService().

Here is the caller graph for this function:

◆ potr_tcp_health_thread_start()

int potr_tcp_health_thread_start ( struct PotrContext_ * ctx,
int path_idx )
extern

TCP ヘルスチェックスレッドを path ごとに起動します。

Parameters
[in,out]ctxセッションコンテキストへのポインタ。
[in]path_idxパスインデックス (0 ~ n_path-1)。
Returns
成功時は POTR_SUCCESS、失敗時は POTR_ERROR を返します。

ctx->global.health_interval_ms が 0 の場合は起動しません (POTR_SUCCESS を返します)。

Definition at line 629 of file potrHealthThread.c.

References PotrContext_::global, PotrGlobalConfig::health_interval_ms, PotrContext_::health_running, PotrContext_::health_thread, POTR_ERROR, POTR_LOG, POTR_SUCCESS, POTR_TRACE_ERROR, POTR_TRACE_VERBOSE, s_health_args, PotrContext_::service, PotrServiceDef::service_id, and tcp_health_thread_func().

Referenced by start_connected_threads().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ potr_tcp_health_thread_stop()

int potr_tcp_health_thread_stop ( struct PotrContext_ * ctx,
int path_idx )
extern

TCP ヘルスチェックスレッドを停止します。

Parameters
[in,out]ctxセッションコンテキストへのポインタ。
[in]path_idxパスインデックス (0 ~ n_path-1)。
Returns
成功時は POTR_SUCCESS、失敗時は POTR_ERROR を返します。

Definition at line 681 of file potrHealthThread.c.

References PotrContext_::health_mutex, PotrContext_::health_running, PotrContext_::health_thread, PotrContext_::health_wakeup, POTR_ERROR, and POTR_SUCCESS.

Referenced by stop_connected_threads().

Here is the caller graph for this function: