Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Tue, 5 Aug 2008 03:41:02 -0700,    group: microsoft.public.dotnet.distributed_apps        back       


BeginAccept Issue in .Net 2.0   
I have a client / server application that needs to handle many short-lived 
connections, and I used a background thread to always keep the number unused 
BeginAccept calls equal to a configurable value.

This worked great in .Net 1.1, but does not work in .Net 2.0.  In 2.0, only 
the first connection is accepted and the accept callback is called to handle 
this connection.  The accept callback is not called for subsequent 
connections.  The client socket shows that it is connected, but the server's 
accept callback is not called.  When the client sends data it hangs.  When I 
shutdown the server, the accept callback gets called for all the outstanding 
calls to BeginAccept.

I was able to get 2.0 to work in a serialized manner by only calling 
BeginAccept once when starting, and then calling it again within the Accept 
Callback, but I'd rather not have to serialize the process of accepting 
client connections.

Any ideas on how to get away from serializing this process in 2.0?
date: Tue, 5 Aug 2008 03:41:02 -0700   author:   Larry Herbinaux

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us