Valdair

Anybody have or know of an example on how to use these No docs and the functions are not exactly intuitive.

Re: Visual C# 2008 (Pre-release) new *Async methods in the Socket class

JDPeckham

i'm interested in seeing this new async method you're referring to, so i can possibly help. This is in orcas that you see a new async socket method Can you tell me what name space and object this method is under is there a new version of System.Net.Socket




Re: Visual C# 2008 (Pre-release) new *Async methods in the Socket class

Valdair

JDPeckham wrote:
i'm interested in seeing this new async method you're referring to, so i can possibly help. This is in orcas that you see a new async socket method Can you tell me what name space and object this method is under is there a new version of System.Net.Socket

Yes it is in Orcas inside the Socket class, BeginAsync etc.





Re: Visual C# 2008 (Pre-release) new *Async methods in the Socket class

VBA Derks

The *Async model is the new model to offer async functionality (there is a section in MSDN that describes when and why to use XxxAsync instead of BeginXxx\EndXxx. The typical client usage is:

Socket = new Socket();

socket.XxxCompleted += OnXxxCompleted // OnXxxCompleted is a callback function that the client code needs to implement)

socket.XxxAsync();

Victor





Re: Visual C# 2008 (Pre-release) new *Async methods in the Socket class

Valdair

No where in the socket class are there any xxxCompleted. Are you sure it was socket What is the url for the msdn article I can't seem to find that either.



Re: Visual C# 2008 (Pre-release) new *Async methods in the Socket class

Peter Ritchie

There's a small example of using SendAsync and some detail why the *Async methods were added in the latest MSDN magazine article Get Connected with the .NET Framework 3.5. Essentially, for heaving load situations the use of IAsyncResult could be limiting and using the Begin* pattern forces use of non reusable IAsyncResult objects.

If you're not interested in a high-performance, heavy load, type socket server I would suggest continuing with the Begin*/End* methods.