Added client side socket in functions and update