Socket events server side.

Please refer to the expected structure of object in socket events
(mentioned as comment in the socket events)