Functions
Rand(n) ⇒ Uint8Array
Rand returns a random byte slice of length n
Kind: global functionReturns:
Uint8Array - - The random byte slice.
Example
RandInt() ⇒ number
RandInt returns a random int
Kind: global functionReturns:
number - - The random integer.Example
log(msg)
log prints given input to stdout with [JS] prefix for debugging purposes Kind: global function
Example
getNetworkPort(port, defaultPort) ⇒ string
getNetworkPort registers defaultPort and returns defaultPort if it is a colliding port with other protocols
Kind: global functionReturns:
string - - The default port if the given port is colliding, otherwise the given port.
Example
isPortOpen(host, port, [timeout]) ⇒ boolean
isPortOpen checks if given port is open on host. timeout is optional and defaults to 5 seconds
Kind: global functionReturns:
boolean - - True if the port is open, false otherwise.
Example
ToBytes(…args) ⇒ Uint8Array
ToBytes converts given input to byte slice
Kind: global functionReturns:
Uint8Array - - The byte slice.
Example
ToString(…args) ⇒ string
ToString converts given input to string
Kind: global functionReturns:
string - - The string.
Example