Details

Methods


<inner> errorListener( errorFunction ) → {function}

Description

create a listener which runs the parameter function with the data from the listener

Parameters
Name Type Description
errorFunction function

function to run inside the return function

Returns

errorListener runs errorFunction with own parameter

Details

<inner> dataListener( socket ) → {function}

Description

create a listener which writes the data to the socket

Parameters
Name Type Description
socket module:net.Socket

socket where the data is written to

Returns

listener which writes data to the socket

Details

<inner> closeListener( socket ) → {function}

Description

destroys the socket it the Listener is fired

Parameters
Name Type Description
socket module:net.Socket

to destroy

Returns

listener which will destroy the socket

Details

<inner> getSocket( port, host ) → {module:net.Socket}

Description

create a socket to given parameter

Parameters
Name Type Description
port Number

port of the server

host String

host of the server

Returns
Details