I have a setup where one program reads from a named pipe and writes the read data to a socket. Another program reads from the socket and writes the data to another named pipe. This is on Linux across nodes. It all works fine doing regular reads and writes on Java FileChannels but when I tried to be more efficient and used transferTo to send the named pipe data out on a socket channel the transferTo always comes back with 0 bytes transferred. Receiving the data transferFrom is more decisive: It gets an exception trying to do a seek on the named pipe (seeks are not allowed on named pipes). Am I trying to do the impossible? Has anyone had luck using transferTo and/or transferFrom with named pipes.
Thanks.