TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Alex
NA
5
0
How to stop running async method
May 1 2008 10:01 AM
Hello, I'm writting a server using async sockets. The server must listen for incoming data on multiple sockets. That means I have multiple calls to the Socket.ReceiveAsync(). The problem arrises when I want to shutdown the server. How I can I stop these ReceiveAsync() methods before I close the sockets ? If I just call the Close() function on a socket I get an exception: Cannot access a disposed socket. after Close() is executed. I can catch the exception but I think there should be a cleaner way to do this.
Reply
Answers (
4
)
Finalization and Performance
yield return