Versions in this module Expand all Collapse all v1 v1.0.0 Oct 10, 2022 Changes in this version + const ModuleName + var Default = &Module + var NoDialErr = errors.New("Module not enable to dial") + var NoListenErr = errors.New("Module not enable to listen") + func RegisterNativeModule(r *require.Registry) + func Require(runtime *goja.Runtime, module *goja.Object) + type DialerChecker = func(network string, laddr, raddr string) bool + func AllowDialTo(hosts ...string) DialerChecker + func DisallowDialTo(hosts ...string) DialerChecker + type ListenerChecker = func(network string, addr string) bool + func AllowListenOn(hosts ...string) ListenerChecker + func DisallowListenOn(hosts ...string) ListenerChecker + type Module struct + DialerChecker DialerChecker + EnableDial bool + EnableListen bool + ListenerChecker ListenerChecker + NetworkChecker NetworkChecker + func (m *Module) Dial(call goja.FunctionCall, runtime *goja.Runtime) (v goja.Value) + func (m *Module) Listen(call goja.FunctionCall, runtime *goja.Runtime) (v goja.Value) + func (m *Module) Require(runtime *goja.Runtime, module *goja.Object) + type NetworkChecker = func(network string, mode string) bool + func NetworkNotOnList(networks ...string) NetworkChecker + func NetworkOnList(networks ...string) NetworkChecker + type TCPConn struct + Local goja.Value + Remote goja.Value + func (c *TCPConn) Close() + func (c *TCPConn) Send(buf []byte) + type TCPListener struct + Addr goja.Value + func (l *TCPListener) Close(a interface{}) + type UDPConn struct + Local goja.Value + Remote goja.Value + func (c *UDPConn) Close() + func (c *UDPConn) Send(buf []byte) + func (c *UDPConn) SendTo(buf []byte, addr string)