Fix the socket example.
Adapt example as a subscription.