0
this.server = net.createServer(this.onAccept);
this.server.listen(this.port);
}
Server.prototype.onAccept = function() {
var client = new Client();
this.addClient(client);
};
Server.prototype.addClient = function (client) {
this.clients.push(client);
};
我得到关于node.js的这个错误:this.addClient不就行了27this.addClient不是函数
功能我不知道为什么会发生。
您的代码被切断。你可以把它全部发布吗? – Bennett