[Mono.Security]: Add 'MonoTlsProvider.SupportsCleanShutdown' and 'MonoTlsSettings...
[mono.git] / mcs / class / System / System.Net / ServicePointManager.cs
index abd23e67270d619d6b6435ca104187a9be488401..56d682bd402541a3c79e35f0bcc17c1922525f86 100644 (file)
@@ -132,20 +132,20 @@ namespace System.Net
                // Fields
                
                public const int DefaultNonPersistentConnectionLimit = 4;
-#if MONOTOUCH
+#if MOBILE
                public const int DefaultPersistentConnectionLimit = 10;
 #else
                public const int DefaultPersistentConnectionLimit = 2;
 #endif
 
-#if !NET_2_1
+#if !MOBILE
                const string configKey = "system.net/connectionManagement";
                static ConnectionManagementData manager;
 #endif
                
                static ServicePointManager ()
                {
-#if !NET_2_1
+#if !MOBILE
 #if CONFIGURATION_DEP
                        object cfg = ConfigurationManager.GetSection (configKey);
                        ConnectionManagementSection s = cfg as ConnectionManagementSection;
@@ -158,7 +158,10 @@ namespace System.Net
                                return;
                        }
 #endif
+
+#pragma warning disable 618
                        manager = (ConnectionManagementData) ConfigurationSettings.GetConfig (configKey);
+#pragma warning restore 618
                        if (manager != null) {
                                defaultConnectionLimit = (int) manager.GetMaxConnections ("*");                         
                        }
@@ -200,7 +203,7 @@ namespace System.Net
                                        throw new ArgumentOutOfRangeException ("value");
 
                                defaultConnectionLimit = value; 
-#if !NET_2_1
+#if !MOBILE
                 if (manager != null)
                                        manager.Add ("*", defaultConnectionLimit);
 #endif
@@ -256,6 +259,12 @@ namespace System.Net
                        }
                }
 
+               [MonoTODO]
+               public static bool ReusePort {
+                       get { return false; }
+                       set { throw new NotImplementedException (); }
+               }
+
                public static SecurityProtocolType SecurityProtocol {
                        get { return _securityProtocol; }
                        set { _securityProtocol = value; }
@@ -280,6 +289,13 @@ namespace System.Net
                        }
                }
 
+               [MonoTODO ("Always returns EncryptionPolicy.RequireEncryption.")]
+               public static EncryptionPolicy EncryptionPolicy {
+                       get {
+                               return EncryptionPolicy.RequireEncryption;
+                       }
+               }
+
                public static bool Expect100Continue {
                        get { return expectContinue; }
                        set { expectContinue = value; }
@@ -294,6 +310,10 @@ namespace System.Net
                        get { return false; }
                }
 
+               internal static bool DisableSendAuxRecord {
+                       get { return false; }
+               }
+
                // Methods
                public static void SetTcpKeepAlive (bool enabled, int keepAliveTime, int keepAliveInterval)
                {
@@ -311,7 +331,7 @@ namespace System.Net
 
                public static ServicePoint FindServicePoint (Uri address) 
                {
-                       return FindServicePoint (address, GlobalProxySelection.Select);
+                       return FindServicePoint (address, null);
                }
                
                public static ServicePoint FindServicePoint (string uriString, IWebProxy proxy)
@@ -352,7 +372,7 @@ namespace System.Net
                                        throw new InvalidOperationException ("maximum number of service points reached");
 
                                int limit;
-#if NET_2_1
+#if MOBILE
                                limit = defaultConnectionLimit;
 #else
                                string addr = address.ToString ();