mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-02 13:30:34 +00:00
Polish the wording of the updated docs pages
Reword the Japanese sentences so they read naturally, and correct the size of the llama.cpp server sources in the code reading chapter.
This commit is contained in:
1 parent
bef278e0d2
commit
c95d799180
20 files changed
+28
-28
No files matched your search
@@ -41,7 +41,7 @@ sse.on_event("leave", [](const auto &msg) {
|
||||
});
|
||||
```
|
||||
|
||||
`on_message()`は、`on_event()`でハンドラを登録していないイベントをすべて受け取る汎用ハンドラです。上の例のように`on_event("message", ...)`を登録すると、`message`イベントはそちらに届きます。
|
||||
`on_message()`は、`on_event()`で登録していない名前のイベントをまとめて受け取る汎用ハンドラです。上の例のように`on_event("message", ...)`を登録した場合、`message`イベントは`on_message()`ではなくそちらに届きます。
|
||||
|
||||
## 接続イベントとエラーハンドリング
|
||||
|
||||
@@ -55,7 +55,7 @@ sse.on_error([](httplib::Error err) {
|
||||
});
|
||||
```
|
||||
|
||||
接続確立時やエラー発生時にもフックを挟めます。エラーハンドラが呼ばれても、`SSEClient`は内部で再接続を試みます。ただし、サーバーが204、403、404を返した場合は再接続しません。
|
||||
接続確立時やエラー発生時にもフックを挟めます。エラーハンドラが呼ばれても、`SSEClient`は内部で再接続を試みます。ただし、サーバーが204、403、404のいずれかを返したときは再接続しません。
|
||||
|
||||
## 非同期で動かす
|
||||
|
||||
|
||||
Reference in new issue
Block a user