II am here to resolve my problem in socket connection and disconnection. I want something like this
1. connection done. (ok) // working
2. on perticular event I am doing to update location of user in database { Here user is online }.
3. But somehow network disconnection the socket will be disconnect and user must be offline. this can be using disconnect event. but I am not aware how to recognise that perticular user has to be updated offline because I don't have user_id in `socket.on('disconnect')` event. please help me out. I googled it everywhere but not helped me out.
sorry for wanting logic but it is really needed to me. Thanks in advance. :)