mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
13 lines
356 B
JavaScript
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;
|
|
};
|