views:

18

answers:

1

Is there a way to do a select() on a named pipe in win32? I want to have it block on the ReadFile call, but for only a few seconds, then if no data was received do some other work.

+1  A: 

You cannot use select() on a named pipe in win32. For emulating select like functionality for named pipes, you can use the named pipe APIs using the overlapped I/O model and WaitForMultipleObjects().

Click here for an example in MSDN for the same

Aditya Sehgal