6
emit 함수를 실행하도록 서버를 만들 수없는 이유를 알 수 없습니다. 이것이node.js에서 emit 함수 사용
this.on('start',function(){
console.log("wtf");
});
모든 콘솔 유형 :
here
here-2
어떤 생각을 왜 늘 'wtf'
를 인쇄
myServer.prototype = new events.EventEmitter;
function myServer(map, port, server) {
...
this.start = function() {
console.log("here");
this.server.listen(port, function() {
console.log(counterLock);
console.log("here-2");
this.emit('start');
this.isStarted = true;
});
}
listener HERE...
}
리스너는 다음과 같습니다
여기 내 코드입니까?
대단히 감사합니다 !!! – Itzik984