Documentation
¶
Index ¶
Constants ¶
View Source
const ModuleName = "socket"
Variables ¶
View Source
var ( NoListenErr = errors.New("Module not enable to listen") NoDialErr = errors.New("Module not enable to dial") )
View Source
var Default = &Module{ EnableListen: true, EnableDial: true, NetworkChecker: nil, ListenerChecker: nil, DialerChecker: nil, }
Functions ¶
func RegisterNativeModule ¶
Types ¶
type DialerChecker ¶
func AllowDialTo ¶
func AllowDialTo(hosts ...string) DialerChecker
func DisallowDialTo ¶
func DisallowDialTo(hosts ...string) DialerChecker
type ListenerChecker ¶
func AllowListenOn ¶
func AllowListenOn(hosts ...string) ListenerChecker
func DisallowListenOn ¶
func DisallowListenOn(hosts ...string) ListenerChecker
type Module ¶
type Module struct {
EnableListen bool
EnableDial bool
NetworkChecker NetworkChecker
ListenerChecker ListenerChecker
DialerChecker DialerChecker
}
type NetworkChecker ¶
func NetworkNotOnList ¶
func NetworkNotOnList(networks ...string) NetworkChecker
func NetworkOnList ¶
func NetworkOnList(networks ...string) NetworkChecker
type TCPConn ¶
type TCPListener ¶
type TCPListener struct {
*events.EventEmitter
Addr goja.Value
// contains filtered or unexported fields
}
func (*TCPListener) Close ¶
func (l *TCPListener) Close(a interface{})
Click to show internal directories.
Click to hide internal directories.