update socket example