Moving socket handling into a service and forcing digest for socket events