authorgravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-07-22 03:11:55+09:00
committergravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-07-22 03:11:55+09:00
logc5c053b6fdde911edd0b488c29fbef0e2aa0a904
treee37aef3627267102d3b4a4a91aa362a36394b57f
parentbc411af4ffb07fa0e8d713c300c2badd1116acff

std.event.tcp: add switch statement in preparation for building-out abstractions;

depends on issue #1274 ;

1 files changed, 9 insertions(+), 2 deletions(-)

std/event/tcp.zig+9-2
...@@ -123,10 +123,17 @@ pub async fn connect(loop: *Loop, _address: *const std.net.Address) !std.os.File...@@ -123,10 +123,17 @@ pub async fn connect(loop: *Loop, _address: *const std.net.Address) !std.os.File
123}123}
124124
125test "listen on a port, send bytes, receive bytes" {125test "listen on a port, send bytes, receive bytes" {
126 if (builtin.os != builtin.Os.linux) {126 // TODO build abstractions for other operating systems
127 // TODO build abstractions for other operating systems127 const skip_test: bool = switch (builtin.os) {
128 builtin.Os.linux => false,
129 //builtin.Os.macosx, builtin.Os.ios => false,
130 else => true,
131 };
132
133 if (skip_test == true) {
128 return error.skip;134 return error.skip;
129 }135 }
136
130 const MyServer = struct {137 const MyServer = struct {
131 tcp_server: Server,138 tcp_server: Server,
132139