I'm looking for a function

```
foo :: Handle -> ByteString

```

which will give me everything that's in the buffer, block if it's empty, and return "" if it's closed.

I've got an app where I'm calling

```
Data.ByteString.Char8.hGet handle 1

```

and everything works adequately, but it's a bit wasteful to call a syscall so many times. Unfortunately if I increase it to even 2, my app gets intermittent hangs, which suggests to me that hGet waits until the buffer is full (or at least bigger than 1).

What am I missing?