manager and socket as event emitters