zig/lib/std/x.zig
lithdew 13068da43e x/os, x/net: re-approach Address, rename namespace TCP -> tcp
Address comments from @ifreund and @MasterQ32 to address unsafeness and
ergonomics of the `Address` API.

Rename the `TCP` namespace to `tcp` as it does not contain any
top-level fields.

Fix missing reference to `sockaddr` which was identified by @kprotty in
os/bits/linux/arm64.zig.
2021-05-03 14:49:10 +09:00

23 lines
609 B
Zig

// SPDX-License-Identifier: MIT
// Copyright (c) 2015-2021 Zig Contributors
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
// The MIT license requires this copyright notice to be included in all copies
// and substantial portions of the software.
const std = @import("std.zig");
pub const os = struct {
pub const Socket = @import("x/os/Socket.zig");
pub usingnamespace @import("x/os/net.zig");
};
pub const net = struct {
pub const tcp = @import("x/net/tcp.zig");
};
test {
inline for (.{ os, net }) |module| {
std.testing.refAllDecls(module);
}
}