mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-16 16:17:38 +03:00
add dummy support for js,wasm (#1955)
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
//go:build linux || darwin || dragonfly || freebsd || netbsd || openbsd || rumprun || (zos && s390x)
|
||||
//go:build !js && !wasm && (linux || darwin || dragonfly || freebsd || netbsd || openbsd || rumprun || (zos && s390x))
|
||||
|
||||
package tcplisten
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build linux || dragonfly || freebsd || netbsd || openbsd || rumprun
|
||||
//go:build !js && !wasm && (linux || dragonfly || freebsd || netbsd || openbsd || rumprun)
|
||||
|
||||
package tcplisten
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package tcplisten
|
||||
|
||||
import (
|
||||
"net"
|
||||
)
|
||||
|
||||
// A dummy implementation for js,wasm
|
||||
type Config struct {
|
||||
ReusePort bool
|
||||
DeferAccept bool
|
||||
FastOpen bool
|
||||
Backlog int
|
||||
}
|
||||
|
||||
func (cfg *Config) NewListener(network, addr string) (net.Listener, error) {
|
||||
return net.Listen(network, addr)
|
||||
}
|
||||
Reference in New Issue
Block a user