I believe your plan is to have each connection run in its own greenlet, but I don't think that will work. Ultimately, a client is a collection of these connections and has to coordinate state across them, so while a client might run in its own greenlet, I think the client will have to manage connections internal to it.

That said, I don't think the connection's `read` method cannot have this sort of loop in it. The underlying event loop only knows when /some/ data is available for reading and while this isn't necessarily going to cause a lot of problems, it is counter to the spirit of the thing. I think ultimately the connection's `read` and associated methods can only read /some/ and may return 0 or more messages. Something along these lines: https://github.com/dlecocq/nsq-py/blob/master/nsq/connection.py#L34