Commit 250aecc
Sockets: fix getipaddr/getipaddrs documentation, add islinklocaladdr function (#34300)
* fix getipaddr/getipaddrs documentation
- resolved IPv4/IPv6 confusion, e.g. getipaddrs() does _not_ return only IPv4
- more realistic example addresses
- example addresses taken from address ranges reserved for documentation
https://en.wikipedia.org/wiki/Reserved_IP_addresses
* add Sockets.islinklocaladdr
IPv6 interfaces always have a link-local address configured, which is
also reported by getipaddrs(). However, typical application servers
are not reachable under their link-local address, therefore this
convenience function helps users of getipaddrs() to filter
out such addresses with `filter(!islinklocaladdr, getipaddrs())`.
This commits also adds a "See also" hint that in applications where
a server process has been started remotely via ssh that
`split(ENV["SSH_CONNECTION"], ' ')[3]` can be a preferable
alternative source for the IP address under which this server
is reachable (namely the address that ssh has already used
successfully to get here).1 parent 5315476 commit 250aecc
File tree
5 files changed
+59
-12
lines changed- stdlib/Sockets
- docs/src
- src
- test
5 files changed
+59
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
244 | 247 | | |
245 | 248 | | |
246 | 249 | | |
| |||
249 | 252 | | |
250 | 253 | | |
251 | 254 | | |
| 255 | + | |
| 256 | + | |
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
| |||
265 | 270 | | |
266 | 271 | | |
267 | 272 | | |
268 | | - | |
| 273 | + | |
269 | 274 | | |
270 | | - | |
| 275 | + | |
271 | 276 | | |
272 | | - | |
| 277 | + | |
273 | 278 | | |
274 | | - | |
275 | | - | |
276 | | - | |
| 279 | + | |
277 | 280 | | |
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
281 | 284 | | |
282 | 285 | | |
283 | 286 | | |
284 | | - | |
285 | | - | |
286 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
287 | 293 | | |
288 | 294 | | |
289 | | - | |
290 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
291 | 298 | | |
292 | 299 | | |
| 300 | + | |
| 301 | + | |
293 | 302 | | |
294 | 303 | | |
295 | 304 | | |
| |||
319 | 328 | | |
320 | 329 | | |
321 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
510 | 520 | | |
511 | 521 | | |
512 | 522 | | |
| |||
0 commit comments