Lambda - net module for low level networking

Options

Hi everyone,

I was pleased to see the most recent update on 18 January includes support for the net module when using Lambda expressions.

Im trying to connect to a remote TCP socket, write some data and get the response. Would it be possible to use the net module in this way?

As a minimum I want to prove it can connect to the server and return true, and if it fails to connect then return false.

const client = new net.Socket();

client.connect(3456, 'server.net', () => {

    return true;

});

return false;