Added 'socket' to the parameter list and moved EPOLLERR and EPOLLHUP after processing of EPOLLIN and EPOLLOUT.

Added 'socket' to the parameter list and moved EPOLLERR and EPOLLHUP
after processing of EPOLLIN and EPOLLOUT.