state update through socket