Commit 18fa493
committed
gh-109532: fix socket HOWTO inaccuracy about send() on broken connection
Correct the claim that send() returns 0 bytes on a broken connection.
In practice, send() on a broken connection raises OSError (EPIPE) rather
than returning 0. Only recv() returns 0 bytes to indicate disconnection.
Add a clarifying comment to the mysend example noting this distinction.1 parent 072cd7c commit 18fa493
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | | - | |
172 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| |||
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| 205 | + | |
| 206 | + | |
204 | 207 | | |
205 | 208 | | |
206 | 209 | | |
| |||
0 commit comments