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.
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
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.