Skip to content

Commit f5ae366

Browse files
committed
0.3.6: Winsock is started at the first socket (#26)
1 parent 7d463ae commit f5ae366

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## 0.3.6
4+
5+
On Windows every request works again. It is a patch release, so a dependency
6+
written as a caret range, `tinyhttps = "^0.3.1"`, resolves to it.
7+
8+
### Winsock is started at the first socket
9+
10+
[#26](https://github.com/mcpplibs/tinyhttps/pull/26). `Socket::platform_init()`
11+
(WSAStartup) existed and was never called. On Windows the first `connect` then
12+
ran `socket()` and `getaddrinfo()` with Winsock unstarted, and every request
13+
ended in `statusCode = 0`, `statusText = "Connection failed"`, with nothing
14+
saying why.
15+
16+
* `Socket::ensure_platform_started()` runs once per process at the top of
17+
`Socket::connect`, before the first `socket()` or `getaddrinfo()`;
18+
`Socket::platform_started()` says whether it ran.
19+
* `platform_init()` is unchanged and still public.
20+
* `tests/test_winsock_start.cpp` is the first socket of its process and checks
21+
both.
22+
323
## 0.3.5
424

525
A handshake that never completes no longer holds a request for good, and a

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,14 @@ Windows). Locally,
214214
### 添加依赖
215215

216216
```bash
217-
mcpp add tinyhttps@0.3.5
217+
mcpp add tinyhttps@0.3.6
218218
```
219219

220220
或在 `mcpp.toml` 中手动添加:
221221

222222
```toml
223223
[dependencies]
224-
tinyhttps = "0.3.5"
224+
tinyhttps = "0.3.6"
225225
```
226226

227227
### 构建

‎mcpp.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
namespace = "mcpplibs"
33
name = "tinyhttps"
4-
version = "0.3.5"
4+
version = "0.3.6"
55
description = "Minimal C++23 HTTP/HTTPS client with SSE streaming support"
66
license = "Apache-2.0"
77
repo = "https://github.com/mcpplibs/tinyhttps"

0 commit comments

Comments
 (0)