update socket sample