porter/libsrc/porter/thread/potrHealthThread.h

1 ファイル

1.1 porter/libsrc/porter/thread/potrHealthThread.h

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

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

1.1.1 作者

c-modernization-kit sample team

1.1.2 バージョン

1.0.0

1.1.3 日付

2026/03/08

1.1.4 インクルード元

potrHealthThread.h のインクルード元

1.1.5 著作権

Copyright (C) CompanyName, Ltd. 2026. All rights reserved.

2 関数

2.1 potr_health_thread_start

int potr_health_thread_start ( struct PotrContext_ *ctx )

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

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

2.1.1 引数

  • ctx [in,out] セッションコンテキストへのポインタ。

2.1.2 戻り値

成功時は POTR_SUCCESS、失敗時は POTR_ERROR を返します。

2.2 potr_health_thread_stop

int potr_health_thread_stop ( struct PotrContext_ *ctx )

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

2.2.1 引数

  • ctx [in,out] セッションコンテキストへのポインタ。

2.2.2 戻り値

成功時は POTR_SUCCESS、失敗時は POTR_ERROR を返します。

2.3 potr_tcp_health_thread_start

int potr_tcp_health_thread_start ( struct PotrContext_ *ctx, int path_idx )

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

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

2.3.1 引数

  • ctx [in,out] セッションコンテキストへのポインタ。
  • path_idx [in] パスインデックス (0 ~ n_path-1)。

2.3.2 戻り値

成功時は POTR_SUCCESS、失敗時は POTR_ERROR を返します。

2.4 potr_tcp_health_thread_stop

int potr_tcp_health_thread_stop ( struct PotrContext_ *ctx, int path_idx )

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

2.4.1 引数

  • ctx [in,out] セッションコンテキストへのポインタ。
  • path_idx [in] パスインデックス (0 ~ n_path-1)。

2.4.2 戻り値

成功時は POTR_SUCCESS、失敗時は POTR_ERROR を返します。