Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8290507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:50:09+00:00 2026-06-08T12:50:09+00:00

I am developing a client application that manages one socket. I am using IOCP

  • 0

I am developing a client application that manages one socket. I am using IOCP to manage asynchronous I/O.

This is a quote from a networking programming book:

All overlapped operations are guaranteed to be executed in the order that the application issued them. However, the completion notifications returned from a completion port are not guaranteed to be in that same order. That is, if an application posts two overlapped WSARecv operations, one with a 10 KB buffer and the next with a 12 KB buffer, the 10 KB buffer is filled first, followed by the 12 KB buffer. The application’s worker thread may receive notification from GetQueuedCompletionStatus for the 12 KB WSARecv before the completion event for the 10 KB operation. Of course, this is only an issue when multiple operations are posted on a socket.

So how should I go about dealing with this case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:50:11+00:00Added an answer on June 8, 2026 at 12:50 pm

    Simplest solution is, to not have more than one outstanding read or write. So if a completion is notified it’s clear, that all data was written to the socket. If, while waiting for IO to be completed, there is a need to write more data to a socket, simply buffer that data and write it, when the IO gets completed.

    If you have more than one outstanding IO to a socket, you have to order them on the read side. On the write side, you have to do some book keeping to know which write was the last and thus, when data was written completely.

    On the other hand, just by writing data to successfully to the socket doesn’t mean, that data was correctly received nor processed on the other side, so there have to be some kind of protocol. If so, you can simply rely on that protocol and simply look for error notifications.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a server-client application that uses 3 ports [TCP SOCKET .Net 4.0].. So
I am developing a client-server application using .Net Remoting. From my server I want
I'm developing an application that uses webservices in python, both sides (server and client)
The model that I am currently developing involves three elements: A client application with
I'm developing client-server application by using .Net, C#, WCF, WPF. And now I need
I am developing an web application which can upload/download a file from client to
I'm developing a .NET 2.0 client application that needs to connect to a WCF
I am developing a Client-Server application using C# .NET Winforms with SQL Server 2008.
I have few question in xcode 4.2 developing.In that i create one application for
I'm developing custom client/server application that requires client to log in with their username

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.