add socket object in front end