Andrew Kelley
c4dc7d7c3d
std.Io.Threaded: implement Unix sockets for Windows
2025-10-29 06:20:52 -07:00
Andrew Kelley
ecdc00466c
std.Io.net: make it easier to use netReceiveMany correctly
2025-10-29 06:20:51 -07:00
Andrew Kelley
a5c309a692
std.Io.net.Socket.send: fix compilation errors
2025-10-29 06:20:51 -07:00
Andrew Kelley
83e4ff6f4c
std.Io: add dirClose
2025-10-29 06:20:50 -07:00
Andrew Kelley
e87ceb76c2
std.Io.net.Server: refine AcceptError set
2025-10-29 06:20:50 -07:00
Andrew Kelley
cf6fa219fd
std.Io.Threaded: fix netWrite cancellation
...
Move std.posix logic over rather than calling into it.
2025-10-29 06:20:50 -07:00
Andrew Kelley
f7bbcb4a4b
fix miscellaneous compilation failures
2025-10-29 06:20:50 -07:00
Andrew Kelley
22334f5730
std: make IPv6 address parsing system-independent
...
before, the max length of the host name depended on the target.
2025-10-29 06:20:50 -07:00
Andrew Kelley
031044b399
std: fix macos compilation errors
2025-10-29 06:20:49 -07:00
Andrew Kelley
426a377c7b
std.Io.net.Stream: add "const" variant to "close"
...
useful for resource management
2025-10-29 06:20:49 -07:00
Andrew Kelley
d3c4158a10
std.Io: implement Select
...
and finish implementation of HostName.connect
2025-10-29 06:20:49 -07:00
Andrew Kelley
35ce907c06
std.Io.net.HostName: move lookup to the interface
...
Unfortunately this can't be implemented "above the vtable" because
various operating systems don't provide low level DNS resolution
primitives such as just putting the list of nameservers in a file.
Without libc on Linux it works great though!
Anyway this also changes the API to be based on Io.Queue. By using a
large enough buffer, reusable code can be written that does not require
concurrent, yet takes advantage of responding to DNS queries as they
come in. I sketched out a new implementation of `HostName.connect` to
demonstrate this, but it will require an additional API (`Io.Select`) to
be implemented in a future commit.
This commit also introduces "uncancelable" variants for mutex locking,
waiting on a condition, and putting items into a queue.
2025-10-29 06:20:49 -07:00
Andrew Kelley
0732ff2263
std.Io.Threaded: implement connecting to unix sockets
2025-10-29 06:20:49 -07:00
Andrew Kelley
e8cea8accb
std.Io.Threaded: implement netListenUnix
2025-10-29 06:20:49 -07:00
Andrew Kelley
539808239e
std.net: IPv6 parsing fixes
2025-10-29 06:20:49 -07:00
Andrew Kelley
923a7bdd7e
std.Io.net: fix parsing IPv4-mapped IPv6 addresses
2025-10-29 06:20:49 -07:00
Andrew Kelley
e0e463bcf7
std.Io.net.Stream.Reader: fix not using buffer
2025-10-29 06:20:49 -07:00
Andrew Kelley
be1ae430a1
std.Io.Threaded.netReadPosix: support cancelation
2025-10-29 06:20:49 -07:00
Andrew Kelley
3b34622368
std.Io: add unix domain sockets API
...
note that "reuseaddr" does nothing for these
2025-10-29 06:20:49 -07:00
Andrew Kelley
47aa5a70a5
std: updating to std.Io interface
...
got the build runner compiling
2025-10-29 06:20:48 -07:00
Andrew Kelley
066864a0bf
std.zig.system: upgrade to std.Io.Reader
2025-10-29 06:20:48 -07:00
Andrew Kelley
b428612a20
WIP: hack away at std.Io return flight
2025-10-29 06:20:48 -07:00
Andrew Kelley
774df26835
WIP: hack at std.Io on a plane
2025-10-29 06:20:48 -07:00
Andrew Kelley
00f26cb0a4
WIP land the std.Io interface
...
fix std lib compilation errors caused by introducing std.Io
2025-10-29 06:20:48 -07:00
Andrew Kelley
a6347a68a9
std.Io.net: implement receiving connectionless messages
2025-10-29 06:20:48 -07:00
Andrew Kelley
95dee2af9c
std.Io: implement netSend
2025-10-29 06:20:48 -07:00
Andrew Kelley
cde5a51d0c
std.Io.net: make netSend support multiple messages
...
this lowers to sendmmsg on linux, and means Io.Group is no longer
needed, resulting in a more efficient implementation.
2025-10-29 06:20:48 -07:00
Andrew Kelley
b22400271f
std.Io.net.HostName: finish implementing DNS lookup
2025-10-29 06:20:48 -07:00
Andrew Kelley
60c4bdb14c
Io.net: implement more networking
...
the next task is now implementing Io.Group
2025-10-29 06:20:48 -07:00
Andrew Kelley
8771a9f082
std.Io.net: progress towards DNS resolution
2025-10-29 06:20:48 -07:00
Andrew Kelley
5782158628
std.net: fix parsing IPv6 addr "::"
2025-10-29 06:20:48 -07:00
Andrew Kelley
885b3f8342
Io.net: finish implementing IPv6 parsing
2025-10-29 06:20:48 -07:00
Andrew Kelley
e7c9df9fb0
Io.net: use resolve for IPv6
...
/etc/resolv.conf might have IPv6 addresses with scope in it, so this is
needed.
2025-10-29 06:20:48 -07:00
Andrew Kelley
d776a6bbbe
Io.net: rework IPv6 parsing and printing
...
extract pure functional logic into pure functions and then layer the
scope crap on top properly
the formatting code incorrectly didn't do the reverse operation
(if_indextoname). fix that with some TODO panics
2025-10-29 06:20:48 -07:00
Andrew Kelley
0e9280ef1a
std.Io: extract Dir to separate file
2025-10-29 06:20:48 -07:00
Andrew Kelley
fc1e3d5bc9
Io.net: partial implementation of dns lookup
2025-10-29 06:20:48 -07:00
Andrew Kelley
b4e5e9d48f
Io.net: implement sortLookupResults
2025-10-29 06:20:48 -07:00
Andrew Kelley
e7729a7b89
std: start moving fs.File to Io
2025-10-29 06:20:48 -07:00
Andrew Kelley
bd3c65f752
std.Io.net: partially implement HostName.lookup
2025-10-29 06:20:48 -07:00
Andrew Kelley
668f905243
add some networking
2025-10-29 06:20:48 -07:00