Interfaces

Server
Socket
SocketType

Properties

Methods

SM connect(options: module:net.ConnectOptionsType, connectionListener: function) net.Socket

Parameters:
Name Type Argument
options module:net.ConnectOptionsType
connectionListener function <optional>
Returns: { net.Socket }

SM connect(port: number, host: string, connectionListener: function) net.Socket

Parameters:
Name Type Argument
port number
host string <optional>
connectionListener function <optional>
Returns: { net.Socket }

SM connect(path: string, connectionListener: function) net.Socket

Parameters:
Name Type Argument
path string
connectionListener function <optional>
Returns: { net.Socket }

SM createConnection(options: module:net.CreateConnectionOptionsType, connectionListener: function) net.Socket

Parameters:
Name Type Argument
options module:net.CreateConnectionOptionsType
connectionListener function <optional>
Returns: { net.Socket }

SM createConnection(port: number, host: string, connectionListener: function) net.Socket

Parameters:
Name Type Argument
port number
host string <optional>
connectionListener function <optional>
Returns: { net.Socket }

SM createConnection(path: string, connectionListener: function) net.Socket

Parameters:
Name Type Argument
path string
connectionListener function <optional>
Returns: { net.Socket }

SM createServer(connectionListener: module:net.CreateServerConnectionListenerCallback) net.Server

Parameters:
Name Type Argument
connectionListener module:net.CreateServerConnectionListenerCallback <optional>
Returns: { net.Server }
Parameters:
Name Type Argument
options module:net.CreateServerOptionsType <optional>
connectionListener module:net.CreateServerConnectionListenerCallback <optional>
Returns: { net.Server }

SM isIP(input: string) number

Parameters:
Name Type
input string
Returns: { number }

SM isIPv4(input: string) boolean

Parameters:
Name Type
input string
Returns: { boolean }

SM isIPv6(input: string) boolean

Parameters:
Name Type
input string
Returns: { boolean }

Callbacks

CreateServerConnectionListenerCallback(socket: net.Socket) void

Parameters:
Name Type
socket net.Socket
Returns: { void }

CreateServerConnectionListenerCallback(socket: net.Socket) void

Parameters:
Name Type
socket net.Socket
Returns: { void }

Type Definitions

T ConnectOptionsType

Type:
  • Object
Properties:
Name Type
allowHalfOpen boolean

T CreateConnectionOptionsType

Type:
  • Object
Properties:
Name Type
allowHalfOpen boolean

T CreateServerOptionsType

Type:
  • Object
Properties:
Name Type
allowHalfOpen boolean