Added code for using the socket service.