Use io.BufferedReader to support gevent.