0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/lib/tcp.js
2009-09-28 18:48:18 +02:00

13 lines
356 B
JavaScript

exports.createServer = function (on_connection, options) {
var server = new node.tcp.Server();
server.addListener("connection", on_connection);
//server.setOptions(options);
return server;
};
exports.createConnection = function (port, host) {
var connection = new node.tcp.Connection();
connection.connect(port, host);
return connection;
};