porter/src/tech-sample/tcpServer/tcpServer_windows.c

1 ファイル

1.1 porter/src/tech-sample/tcpServer/tcpServer_windows.c

TCP サーバーサンプル Windows 実装。

Windows 固有のサーバー処理を実装します。

  • CreateProcess() を使った接続ごとプロセス生成 (run_fork_server)
  • 名前付きパイプを使ったプリフォーク (run_prefork_server)
  • プラットフォームフック (platform_init / platform_cleanup / dispatch_internal_args)

main() / handle_client_session() / parse_args() は tcpServer.c に実装します。 g_session_fn の実体は tcpServer_common.c に定義されます。

内部起動パターン (ユーザーは直接使わない):

  • tcpServer --child <socket_handle> : fork 版の子プロセス
  • tcpServer --worker <pipe_name> : prefork 版のワーカープロセス

1.1.1 作者

c-modernization-kit sample team

1.1.2 バージョン

1.0.0

1.1.3 日付

2026/03/17

1.1.4 著作権

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