Hi,

I am evaluating Vibe.d for my next project. It will be used as a TCP and UDP server.

I just compiled basic TCP example but the momnet I wanted to do simple change things started to work unexpectedly.

In my simple example client app just writes bytes to socket and then starts reading.

Things work ok when handler looks like this:

void onConnection(TCPConnection conn)
{
  conn.write(conn);
}

but when I change it to:

void onConnection(TCPConnection conn)
{
  auto data = conn.readAll;
  conn.write(data);
}

handler never writes data back because readAll() blocks. In other thread I found the answer: realAll() blocks until client closes connection. Answer also suggests readLine() but in my case it wont work as data is binary.

My question: how to read InputStream the same way conn.write(conn) does in the first version?