refactor(socket)add onConnection