Browse Source

2010-06-24 Atsushi Enomoto <[email protected]>

	* HttpTransportBindingElement.cs :
	  Use new HTTP channel listener implementation.

	* ChannelDispatcher.cs : enable service throttling again.
	  This time Http(Listener), ASP.NET and TCP listeners all work.

	* System.ServiceModel.dll.sources :
	  add new HTTP channel listener implementation sources.

	  Old sources will be kept for a while, won't entirely vanish as
	  ASP.NET support will live there.


svn path=/trunk/mcs/; revision=159491
Atsushi Eno 15 years ago
parent
commit
b1be2aea6f

+ 8 - 0
mcs/class/System.ServiceModel/ChangeLog

@@ -1,3 +1,11 @@
+2010-06-24  Astushi Enomoto  <[email protected]>
+
+	* System.ServiceModel.dll.sources :
+	  add new HTTP channel listener implementation sources.
+
+	  Old sources will be kept for a while, won't entirely vanish as
+	  ASP.NET support will live there.
+
 2010-05-28  Astushi Enomoto  <[email protected]>
 
 	* System.ServiceModel.dll.sources : remove old code from winfx beta.

+ 5 - 0
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog

@@ -1,3 +1,8 @@
+2010-06-24  Atsushi Enomoto  <[email protected]>
+
+	* HttpTransportBindingElement.cs :
+	  Use new HTTP channel listener implementation.
+
 2010-06-23  Atsushi Enomoto  <[email protected]>
 
 	* HttpListenerManager.cs : cosmetic code formatting fix.

+ 3 - 2
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs

@@ -30,11 +30,11 @@ using System.Collections.Generic;
 using System.Net;
 using System.Net.Security;
 using System.ServiceModel.Channels;
+using System.ServiceModel.Channels.Http;
 using System.ServiceModel.Description;
 
 namespace System.ServiceModel.Channels
 {
-	[MonoTODO]
 	public class HttpTransportBindingElement : TransportBindingElement,
 		IPolicyExportExtension, IWsdlExportExtension
 	{
@@ -180,7 +180,8 @@ namespace System.ServiceModel.Channels
 			if (ServiceHostingEnvironment.InAspNet)
 				return new AspNetChannelListener<TChannel> (this, context);
 			else
-				return new HttpSimpleChannelListener<TChannel> (this, context);
+				return new HttpStandaloneChannelListener<TChannel> (this, context);
+//				return new HttpSimpleChannelListener<TChannel> (this, context);
 		}
 #endif
 

+ 5 - 0
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog

@@ -1,3 +1,8 @@
+2010-06-24  Atsushi Enomoto  <[email protected]>
+
+	* ChannelDispatcher.cs : enable service throttling again.
+	  This time Http(Listener), ASP.NET and TCP listeners all work.
+
 2010-06-21  Atsushi Enomoto  <[email protected]>
 
 	* ChannelDispatcher.cs : raise an error if IChannelListener is

+ 4 - 4
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs

@@ -467,10 +467,10 @@ namespace System.ServiceModel.Dispatcher
 				// http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/3faa4a5e-8602-4dbe-a181-73b3f581835e
 
 				while (loop) {
-					// FIXME: enable throttling
-					// FIXME: take MaxConcurrentCalls into consideration too.
-//					while (loop && channels.Count < owner.ServiceThrottle.MaxConcurrentSessions) {
-					while (loop && channels.Count < 1) {
+					// FIXME: take MaxConcurrentCalls into consideration appropriately.
+					while (loop && channels.Count < Math.Min (owner.ServiceThrottle.MaxConcurrentSessions, owner.ServiceThrottle.MaxConcurrentCalls)) {
+						// FIXME: this should not be required, but saves multi-ChannelDispatcher case (Throttling enabled) for HTTP standalone listener...
+						Thread.Sleep (100);
 						channel_acceptor ();
 						creator_handle.WaitOne (); // released by ChannelAccepted()
 					}

+ 7 - 0
mcs/class/System.ServiceModel/System.ServiceModel.dll.sources

@@ -312,6 +312,13 @@ System.ServiceModel.Channels/WSSignedXml.cs
 System.ServiceModel.Channels/WindowsStreamSecurityBindingElement.cs
 System.ServiceModel.Channels/XmlObjectSerializerBodyWriter.cs
 System.ServiceModel.Channels/XmlReaderBodyWriter.cs
+System.ServiceModel.Channels.Http/HttpChannelListenerEntry.cs
+System.ServiceModel.Channels.Http/HttpContextInfo.cs
+System.ServiceModel.Channels.Http/HttpListenerManager.cs
+System.ServiceModel.Channels.Http/HttpListenerManagerTable.cs
+System.ServiceModel.Channels.Http/HttpStandaloneChannelListener.cs
+System.ServiceModel.Channels.Http/HttpStandaloneReplyChannel.cs
+System.ServiceModel.Channels.Http/HttpStandaloneRequestContext.cs
 System.ServiceModel.ComIntegration/Dummy.cs
 System.ServiceModel.Configuration/AddressHeaderCollectionElement.cs
 System.ServiceModel.Configuration/AllowedAudienceUriElement.cs