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.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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