I don't think I quite understand the question.
If you use the low-level read(2) and write(2) system calls, then you will always get unbuffered I/O. If you use the libc functions fread(3) and fwrite(3) then you will get line-buffered I/O, at least by default. You can use setbuf() to control buffering on stdin and stdout.
expect(1) is a program that interacts with another program by reading it's standard output stream and writing to its standard input stream, buffered or not. Is this what you're wanting to do? Or are you trying to pipe a stream without buffering it?