On Wed 04 July 2012 at 13:43 -0700, Jirka Daněk wrote:
> Dear Gophers,
>
> i am communicating with a server using *net.Conn*, which I get from
> net.Dial. To make my job easier, I wrapped it with *bufio.NewReader*(), so
> I can use convenience functions like *ReadBytes*.
>
> My problem is that all functions I get with buffered reader are
> non-blocking. That becomes a problem when the server has nothing to say for
> a while and I keep getting EOFs from reads. I assume, once I call *
> bufio.NewReader* at an unbuffered reader, there is no way back. I cannot
> return to using the unbuffered reader directly.
Buffered readers have blocking behaviour. What is your problem about?
Maybe you should show some code with details about what you see.
Rémy.