Full implementation of the procol

This commit is contained in:
2014-11-01 23:02:35 +01:00
parent 1e7d36bd3c
commit a33b867112
4 changed files with 291 additions and 97 deletions

19
lib/server.js Normal file
View File

@@ -0,0 +1,19 @@
var net = require("net");
var Controler = require("controler");
function createServer(host, port, callback) {
"use strict";
var server = net.createServer(function (connexion) {
var ctrl = new Controler(connexion, function(pwd) {
return callback(ctrl, pwd);
});
});
server.listen(host,port, function () {
});
}