简体   繁体   中英

Select on a named pipe

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM