lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I think you should strive to hide the OS dependencies.

But I did. The socket calls just return an event id. All OS specific code
is in usocket.c and wsocket.c.

[Ok, I know what you mean -- I just have chosen a different abstraction.]

> Event types w,r,x *can* be emulated under Windows.

Ok, but this is forcing the POSIX model onto the Windows I/O subsystem.
Note that I'm a 'POSIX-guy', so hey ... this would simplify my life. :-)

But apparently we do not get very far with this approach. AFAIK you need
WSAEventSelect for the r/w/x-model? But this needs a Windows handle per
socket and then we are stuck at 64 sockets.

Also don't be shied away by the amount of text I wrote. The overlapped I/O
implementation itself should weigh in at around 10 lines of code more
or less ... the calls just have different names and a little bit of setup
code is required.