mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
std.event.tcp: add switch statement in preparation for building-out abstractions;
depends on issue #1274 ;
This commit is contained in:
parent
bc411af4ff
commit
c5c053b6fd
@ -123,10 +123,17 @@ pub async fn connect(loop: *Loop, _address: *const std.net.Address) !std.os.File
|
||||
}
|
||||
|
||||
test "listen on a port, send bytes, receive bytes" {
|
||||
if (builtin.os != builtin.Os.linux) {
|
||||
// TODO build abstractions for other operating systems
|
||||
// TODO build abstractions for other operating systems
|
||||
const skip_test: bool = switch (builtin.os) {
|
||||
builtin.Os.linux => false,
|
||||
//builtin.Os.macosx, builtin.Os.ios => false,
|
||||
else => true,
|
||||
};
|
||||
|
||||
if (skip_test == true) {
|
||||
return error.skip;
|
||||
}
|
||||
|
||||
const MyServer = struct {
|
||||
tcp_server: Server,
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user