Select by named pipe

Is there a way to do select () for a named pipe in win32? I want it to block when the ReadFile is called, but only for a few seconds, and then if the data was not received, follow some other steps.

+4
source share
1 answer

You cannot use select () for a named pipe in win32. To emulate the function of selecting similar functions for named pipes, you can use the named pipe APIs using the overlapping I / O model and WaitForMultipleObjects ().

Click here for an example on MSDN for the same

+4
source

Source: https://habr.com/ru/post/1312535/


All Articles