test socket flow.