mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-04-11 19:28:30 +00:00
Update README
This commit is contained in:
@@ -1475,12 +1475,6 @@ auto sock = svr.socket();
|
|||||||
httplib::set_socket_opt(sock, IPPROTO_TCP, TCP_NODELAY, 1);
|
httplib::set_socket_opt(sock, IPPROTO_TCP, TCP_NODELAY, 1);
|
||||||
```
|
```
|
||||||
|
|
||||||
For time-based options, use `set_socket_opt_time` from the `detail` namespace:
|
|
||||||
|
|
||||||
```cpp
|
|
||||||
httplib::detail::set_socket_opt_time(sock, SOL_SOCKET, SO_RCVTIMEO, 5, 0); // 5 seconds
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> For most use cases, prefer `set_tcp_nodelay(true)` or `set_socket_options(callback)` on the Server/Client instead of calling `set_socket_opt` directly.
|
> For most use cases, prefer `set_tcp_nodelay(true)` or `set_socket_options(callback)` on the Server/Client instead of calling `set_socket_opt` directly.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user