Add socket reader code to service application.