[Mono-list] Using Mono with named pipes/fifo queues

Robert Jordan robertj at gmx.net
Fri Apr 3 12:58:31 EDT 2009


weismat wrote:
> I would like to use Mono to write and read from a named pipe on Linux to
> exchange large amounts of data between programs.
> I have managed to write using File.Open and read using File.Read, but not
> the same time.
> Has anyone experience using FIFO queues with Mono and give me any
> recommendations?
> Thanks!

For both reading/writing at the same time you must operate the fifo
in non-blocking mode. Try one of the FileStream ctors that support
the "bool useAsync" argument. If it still doesn't work, you probably
have to resort to Mono.Posix that definitely can open files with the
O_NONBLOCK flag.

Robert



More information about the Mono-list mailing list