feat(udp): Udp.* - polled IPv4 datagrams on macOS and Windows
Udp.open/port/send/recv/from_ip/from_port/close/resolve/local_ip/ip/ip_text, native BSD sockets (udp.ll) and Winsock (udp_win.ll, -lws2_32), linked only when a program uses Udp.*; example, docs and tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
6a7f1dd393
commit
ebb1a00352
24 changed files with 68630 additions and 66360 deletions
22
docs/language/udp/udp-local_ip.md
Normal file
22
docs/language/udp/udp-local_ip.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
id: udp-local_ip
|
||||
name: Udp.local_ip
|
||||
category: udp
|
||||
kind: namespace-method
|
||||
tokens: Udp.local_ip
|
||||
sig: Udp.local_ip() -> int
|
||||
tip: This machine's address.
|
||||
order: 8
|
||||
ns: Udp
|
||||
member: local_ip
|
||||
---
|
||||
|
||||
The address this machine reaches the internet from - the one a player on the same network would dial. No packet is sent; <code>0</code> when there is no route.
|
||||
|
||||
```ludic
|
||||
program Demo {
|
||||
entry {
|
||||
print(Udp.ip_text(ip: Udp.local_ip()))
|
||||
}
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue