Rella
Rella

Reputation: 66965

How to turn stream from Named Pipe into Socket Stream? (in C++ on Windows)

How to turn stream from Named Pipe into Socket Stream? (in on Windows) (Share all new data in pipe stream on socket)?

Upvotes: 1

Views: 687

Answers (1)

lornova
lornova

Reputation: 6933

The nice thing of named pipes in Windows is that they already work in a network just specifying the server name in the:

CreateFile("\\ServerName\pipe\PipeName", ...

However, if this not fits your needs, you just have to build a read loop (I suggest OVERLAPPED I/O) that, at every read from the pipe, writes the received data to the socket.

Upvotes: 1

Related Questions