I have the following simple NodeJS script and want to modify it slightly….
var sys = require( 'sys' ), net = require( 'net' );
var outputserver = net.createServer( function( stream ) {
stream.addListener( 'data', function( data ) {
sys.puts( data );
//Want to output anything from the clientserver data here
});
}).listen( 7001, 'localhost' );
var clientserver = net.createServer( function( stream ) {
stream.addListener( 'data', function( data ) {
sys.puts( data );
});
}).listen( 7000, 'localhost' );
I need anything coming in from the “clientserver” to be output to the “outputserver” stream. There will be 50-60 clients connecting to the the “clientserver”
This should work: