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