mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-08-11 21:01:24 +00:00
T04 (mTLS) had grown a "WebSocketClient" subsection describing wss:// client certificates, and c12/t02 were getting similar WebSocketClient asides for timeouts and CA paths. The Cookbook's own index already separates WebSocket into its own category (W01-W04) from TLS/Security (T01-T05) and Client (C01-C19), so burying WebSocketClient specifics inside those pages fought the site's structure. Move that content into two new recipes under the WebSocket category instead: - W05: wss:// TLS setup (set_ca_cert_path CA directory parity, PemMemory client certificate) - W06: WebSocketClient's three timeouts, including the recently added chrono overloads T04, T02, C12, and W01 now carry a single reference link to the new pages instead of duplicated explanations, matching the site's existing cross-link convention. While rewriting T04's client-side section, noticed it documented SSLClient's file-path constructor but not its PemMemory one, even though the server-side section covered both forms for SSLServer. Added the missing PemMemory example so both sides are symmetric.
4.5 KiB
4.5 KiB
title, order, status
| title | order | status |
|---|---|---|
| Cookbook | 0 | draft |
「〇〇をするには?」という問いに答えるレシピ集です。各レシピは独立しているので、必要なページだけ読めます。基本的な使い方はTourで紹介しています。
クライアント
基本
認証
ファイル送信
ストリーミング・進捗
接続・パフォーマンス
- C12. タイムアウトを設定する
- C13. 全体タイムアウトを設定する
- C14. 接続の再利用とKeep-Aliveの挙動を理解する
- C15. 圧縮を有効にする
- C16. プロキシを経由してリクエストを送る
エラー処理・デバッグ
サーバー
基本
- S01. GET / POST / PUT / DELETEハンドラを登録する
- S02. JSONリクエストを受け取りJSONレスポンスを返す
- S03. パスパラメーターを使う
- S04. 静的ファイルサーバーを設定する
ストリーミング・ファイル
ハンドラチェーン
- S09. 全ルートに共通の前処理をする
- S10. Post-routing handlerでレスポンスヘッダーを追加する
- S11. Pre-request handlerでルート単位の認証を行う
- S12.
res.user_dataでハンドラ間データを渡す
エラー処理・デバッグ
運用・チューニング
- S17. ポートを動的に割り当てる
- S18.
listen_after_bindで起動順序を制御する - S19. グレースフルシャットダウンする
- S20. Keep-Aliveを調整する
- S21. マルチスレッド数を設定する
- S22. Unix domain socketで通信する
TLS / セキュリティ
- T01. OpenSSL・mbedTLS・wolfSSLの選択指針
- T02. SSL証明書の検証を制御する
- T03. SSL/TLSサーバーを立ち上げる
- T04. mTLSを設定する
- T05. サーバー側でピア証明書を参照する