update socket demo