28 Aug
2003
28 Aug
'03
11:58 p.m.
On Thu, 28 Aug 2003, Robin Rowe wrote:
Hi. The IO_submit code isn't portable to Windows. Unlike unix, Windows offers only blocking io on pipes. The usual way to deal with this is to spin off read or write into another thread where it can block without hanging the program. Your io scheme is complicated enough that it isn't immediately obvious how best to do that.
Can somebody offer more insight into the code below or offer any suggestions? How long does an IO_submit operation stay open and what data is transmitted normally? What dialog is expected across the pipe?
Use two connected sockets instead of the pipe. You can create such pair for example by listening random port (bind to port 0) and connecting to address found out using getsockname.