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 6476889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:52:52+00:00 2026-05-25T06:52:52+00:00

Reading the MSDN documentation for Socket.AcceptAsync I am still not entirely clear if there

  • 0

Reading the MSDN documentation for Socket.AcceptAsync I am still not entirely clear if there is a complimentary ‘End’ method.

So, in the case of BeginAccept() there is an EndAccept() method that completes the call and takes the IAsyncResult as a parameter, allowing the developer access to the Socket (via the IAsyncResult.AsyncState method). Calling EndAccept (or any other Endxxx method pair) internally cleans up some CLR allocated resources, as well as providing functionality to monitor if an asynchronous operation actually completed/errored etc.

All this leads me to the question of whether there is a need to call an End method following a call to AcceptAsync – or ReceiveAsync for that matter? Or are their End methods neatly wrapped up within the Async, perhaps as a Task and ContinueWith? Hence why a SocketAsyncEventArgs contains the Socket itself.

If anyone knows then brilliant! Many thanks!

  • 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-05-25T06:52:52+00:00Added an answer on May 25, 2026 at 6:52 am

    No. There are no End method.

    You should handle the Completed event in the SocketAsyncEventArgs. Also note that ReceiveAsync etc can complete directly (and therefore not trigger the event).

    Update

    Hence why a SocketAsyncEventArgs contains the Socket itself.

    It’s because you should be able to handle IO operations for all clients in the same class. You also have a UserToken property which can be used to store client specific information.

    Or are their End methods neatly wrapped up within the Async, perhaps as a Task and ContinueWith

    No. The new Async model are more like the “real” model (IO Completion ports) which are provided by Windows. The Begin/End kind of structure was introduced to make the asynchronous programming easier. The XxxxAsync model was created to get even better performance for those applications that need it (imho there are a few that will benefit from it, but it’s really important for those)

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

Sidebar

Related Questions

Maybe I am just not reading the MSDN documentation correctly, but given a function
I was reading the MSDN documentation for the System.Windows.Forms.Form.OnClosing() method and noticed: CAUTION: The
I have been reading the MSDN documentation on subclassing and I have been successful
i've been reading through the linq to xml documentation in msdn and some other
I am reading the Asp.net security documentation on msdn.I come across these tow terms
I was reading over the documentation for query hints: http://msdn.microsoft.com/en-us/library/ms181714(SQL.90).aspx And noticed this: FAST
When reading the MSDN documentation it always lets you know if a class is
I vaguely remember reading somewhere (in MSDN ODBC documentation?) that one application cannot make
Reading msdn documentation for dictionaries it says : Public static (Shared in Visual Basic)
I'm reading about the CallContext class ( http://msdn.microsoft.com/en-us/library/system.runtime.remoting.messaging.callcontext.aspx ). The documentation says something about

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.