Jump to content
  • Advertisement
Sign in to follow this  
blueone

IOCP disaster

This topic is 4487 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Since last week, i focus on searching over google on how to implement this thing (IOCP - Input/Output Completion Port). This strange feeling i cant explain while trying hard to get the idea on how to make it work is really bad. I even think of it till I sleep on how im going to make it work. So, this what i am going to ask. Please respect my ignorance about this thing. ;) How can I start a iocp winsock program? Dont worry, ive already done some BASIC winsock programs like sending and recieving messages between two computers via TCP and UDP so I could get the idea easily. Ive also read the Microsoft's "Windows Sockets 2.0: Write Scalable Winsock Apps Using Completion" and downloaded it's code but the OVERLAPPEDPLUS class isnt defined. Also several classes from other websites but they are so messy. All i need is how im going to do this. WSAStartup(514 or MAKEWORD(2,2),&wsadata); ---I already knew this sock = WSASocket(AF_INET, SOCK_STREAM, 0, NULL, 0, WSA_FLAG_OVERLAPPED); --- =) ?????? i dunno whats next sending and receiving also T_T closesocket(sock); ROFL Any winsock skilled one please help me! im suffering serious stress!

Share this post


Link to post
Share on other sites
Advertisement
Here's my recommendation for you to make progress on your project (assuming your project is something larger than just "learn IOCP with WinSock"):

Use select(), or another simple socket multiplexer (maybe even WSAAsyncSelect()) to get your project working. The benefits of IOCP only come in under very heavy client load and when you structure the entire application to take advantage of that specific programming model. It does not sound as if that's something you need to solve right now.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!