Do a WaitOne on the WaitHandle in the IAsyncResult, returned from BeginSend, before 
calling EndSend.  Or pass a callback to the BeginSend, and then call EndSend within 
the callback.  A lot of the current socket documentation is just plain wrong.  I 
reported it a couple weeks ago, and got a response the other day saying that it has 
been updated.

Garry Barclay <[EMAIL PROTECTED]> wrote:I'm still struggling to make a small demo 
(it's definitely a timing thing
and it appears most readily on a dual-processor machine running server
GC), but the current version of the program works when we send using the
following line of code:

return m_socket.Send(buffer, offset, size, socketFlags);

and fails with the replacement:

return m_socket.EndSend(m_socket.BeginSend(buffer, offset, size,
socketFlags, null, null));

In this case we lose a thread as well as a pinned handle every time it
occurs. This has to be a framework bug.

===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
Some .NET courses you may be interested in:


>>> Error in line 15 of ADVANCED-DOTNET.MAILTPL: unknown formatting command <<<
-> .NET Architecture and Design: Designing Distributed Applications with <-



---------------------------------
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
Some .NET courses you may be interested in:

Essential .NET: building applications and components with CSharp
August 30 - September 3, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to