modify expect to directly recv from the tcp socket