JuliaLang/julia — pull request #2831 by danielmendel (2013-04-11 15:20:57+00:00)
Title: Add readavailable for AsyncSockets

`readavailable` is like `readline` but instead of waiting for a newline character, it waits until any data is available.

This is very useful for handling HTTP POST requests in the webstack `Http.jl` because our previous implementation with `readline` would fail to get the body data from a POST request.

This is the blocking equivalent of a read callback; it gives you data when it has it and otherwise yields.