improve socket client.