remove unused EventEmitter  && use socket.setTimeout instead of global setTimeout

use socket.setTimeout instead of global setTimeout
remove unused EventEmitter