Build unbuffered input stream for client, use buffering for output stream.