From 20f10c78b37a0cfaa40d5f25053a442ec47fad5b Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Mon, 27 Aug 2018 20:56:49 +0200 Subject: [PATCH] add support for wasm --- common/buf/readv_posix.go | 1 + common/buf/readv_reader.go | 2 ++ common/buf/readv_reader_wasm.go | 12 ++++++++++++ common/buf/readv_test.go | 2 ++ common/buf/readv_windows.go | 2 -- transport/internet/domainsocket/dial.go | 1 + transport/internet/domainsocket/listener.go | 1 + 7 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 common/buf/readv_reader_wasm.go diff --git a/common/buf/readv_posix.go b/common/buf/readv_posix.go index 22f6d3ab4..3cf9ad144 100644 --- a/common/buf/readv_posix.go +++ b/common/buf/readv_posix.go @@ -1,4 +1,5 @@ // +build !windows +// +build !wasm package buf diff --git a/common/buf/readv_reader.go b/common/buf/readv_reader.go index b624b1b71..926a1c7fb 100644 --- a/common/buf/readv_reader.go +++ b/common/buf/readv_reader.go @@ -1,3 +1,5 @@ +// +build !wasm + package buf import ( diff --git a/common/buf/readv_reader_wasm.go b/common/buf/readv_reader_wasm.go new file mode 100644 index 000000000..4b775bc6a --- /dev/null +++ b/common/buf/readv_reader_wasm.go @@ -0,0 +1,12 @@ +package buf + +import ( + "io" + "syscall" +) + +const useReadv = false + +func NewReadVReader(reader io.Reader, rawConn syscall.RawConn) Reader { + panic("not implemented") +} diff --git a/common/buf/readv_test.go b/common/buf/readv_test.go index 4a6575a06..8f8eb2b5d 100644 --- a/common/buf/readv_test.go +++ b/common/buf/readv_test.go @@ -1,3 +1,5 @@ +// +build !wasm + package buf_test import ( diff --git a/common/buf/readv_windows.go b/common/buf/readv_windows.go index 88975f079..a812ee04b 100644 --- a/common/buf/readv_windows.go +++ b/common/buf/readv_windows.go @@ -1,5 +1,3 @@ -// +build windows - package buf import ( diff --git a/transport/internet/domainsocket/dial.go b/transport/internet/domainsocket/dial.go index c0db02c0e..52c962b63 100644 --- a/transport/internet/domainsocket/dial.go +++ b/transport/internet/domainsocket/dial.go @@ -1,4 +1,5 @@ // +build !windows +// +build !wasm package domainsocket diff --git a/transport/internet/domainsocket/listener.go b/transport/internet/domainsocket/listener.go index e02e3a293..0bfd60203 100644 --- a/transport/internet/domainsocket/listener.go +++ b/transport/internet/domainsocket/listener.go @@ -1,4 +1,5 @@ // +build !windows +// +build !wasm package domainsocket