IOCP ports!

Started by
1 comment, last by laeuchli 22 years, 8 months ago
Do I have to use WSARecv with IOCP ports? Or can I use just normal recv? Cause I''m trying with normal recv, and it just isn''t working :-(.
Advertisement
From what I''ve learned in the last few weeks, you have to use a function that understands overlapped I/O. WSARecv/WSASend are one way. The other way I have seen people do it is with WriteFile/ReadFile.

Hope that helps. There aren''t a ton of examples of IOCP out there yet.

-BlueNexus
-BlueNexus--This is my sig. There are many like it, but this one is mine.
Once you make the call that creates the overlapped IO structure, the code to handle it is the same for commports, socket, & files. There will be differences in the functions called to handle the data once it''s completed, but the wating part is nearly identical for all three cases - so you can look at overlapped file io for examples (don''t look at the comm stuff, it''s poor code and usaully wrong).

I think there''s an article on GameDev about using IOCP''s as well, search ''em.

Magmai Kai Holmlor
- Not For Rent
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement