save socket in mongodb