Class: UnixTransport

UnixTransport

new UnixTransport()

A UnixTransport connects to the forwarder using a Unix socket for Node.js.
Source:

Methods

(static) ConnectionInfo(filePath)

Create a new UnixTransport.ConnectionInfo which extends Transport.ConnectionInfo to hold the socket file path for the Unix socket connection.
Parameters:
Name Type Description
filePath string The file path of the Unix socket file.
Source:

close()

Close transport
Source:

connect(connectionInfo, elementListener, onopenCallback, onclosedCallback) → {undefined}

Connect to a Unix socket according to the info in connectionInfo. Listen on the port to read an entire packet element and call elementListener.onReceivedElement(element). Note: this connect method previously took a Face object which is deprecated and renamed as the method connectByFace.
Parameters:
Name Type Description
connectionInfo UnixTransport.ConnectionInfo A UnixTransport.ConnectionInfo with the Unix socket filePath.
elementListener object The elementListener with function onReceivedElement which must remain valid during the life of this object.
onopenCallback function Once connected, call onopenCallback().
onclosedCallback type If the connection is closed by the remote host, call onclosedCallback().
Source:
Returns:
Type
undefined

isLocal(connectionInfo, onResult, onError)

Determine whether this transport connecting according to connectionInfo is to a node on the current machine. Unix transports are always local.
Parameters:
Name Type Description
connectionInfo UnixTransport.ConnectionInfo This is ignored.
onResult function This calls onResult(true) because Unix transports are always local.
onError function This is ignored.
Source:

send()

Send data.
Source: