c++ – Read Write Issue in Named Pipes on CentOS 7

I am new in NamedPipe concept on Linux/Centos 7. I want to implement read write funtions between my Windows and CentOS PC using NamedPipe. I have created a NamedPipe on CentOS PC using mkfifo function and written some text on this pipe.

On other side(Windows PC), I want to read that text written on NamedPipe. I have tried to use both CreateFile and open function for Pipe handle. I have successfully got the handle of Pipe but ReadFile and read function failed.

What I have tried:

I have created a NamedPipe on CentOS PC using mkfifo function.

int res; res = mkfifo("fifo1",0777); //creates a named pipe with the name fifo1

and written some text on this pipe.

Now I want to perform Read and write operations on NamedPipe on my Windows PC.
I will really appreciate if any one can help me out with that issue.

Read more here: Source link