clementfarabet / async

An async framework for Lua/Torch.
116 stars 35 forks source link

example tcp server on node.js side #18

Closed culurciello closed 10 years ago

culurciello commented 10 years ago

Hi guys, do you have an example of how to set up a TCP server on node.js to work with the client in here?

ocallaco commented 10 years ago

you just want a simple tcp echo server for the tcp client in async tests? i think this should work for that:

var net = require('net');
var server = net.createServer(function (socket) {
  socket.pipe(socket);
});
server.listen(8483, '127.0.0.1');
culurciello commented 10 years ago

Thank you, this works well