New tests.
[mono.git] / mcs / class / System / System.Net.Sockets / Socket_2_1.cs
index 540c9815a8f78d2337d624aacc51f1ff65ee25a6..af54044c3d50f2039abc56e331ebfc96c0462583 100644 (file)
@@ -227,7 +227,7 @@ namespace System.Net.Sockets {
                                                             bool block,
                                                             out int error);
 #endif
-#if !NET_2_1 || MONOTOUCH
+
                public bool Blocking {
                        get {
                                return(blocking);
@@ -246,7 +246,7 @@ namespace System.Net.Sockets {
                                blocking=value;
                        }
                }
-#endif
+
                public bool Connected {
                        get { return connected; }
                        internal set { connected = value; }
@@ -489,7 +489,7 @@ namespace System.Net.Sockets {
                                if (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any))
                                        throw new SocketException ((int) SocketError.AddressNotAvailable);
 
-#if NET_2_1 && !MONOTOUCH
+#if MOONLIGHT
                        if (protocol_type != ProtocolType.Tcp)
                                throw new SocketException ((int) SocketError.AccessDenied);
 #elif NET_2_0
@@ -565,7 +565,6 @@ namespace System.Net.Sockets {
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                extern static bool Poll_internal (IntPtr socket, SelectMode mode, int timeout, out int error);
 
-#if !NET_2_1 || MONOTOUCH
                /* This overload is needed as the async Connect method
                 * also needs to check the socket error status, but
                 * getsockopt(..., SO_ERROR) clears the error.
@@ -600,7 +599,7 @@ namespace System.Net.Sockets {
                        
                        return result;
                }
-#endif
+
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                private extern static int Receive_internal(IntPtr sock,
                                                           byte[] buffer,
@@ -726,7 +725,7 @@ namespace System.Net.Sockets {
 #endif
                }
 
-#if NET_2_1 && !MONOTOUCH
+#if MOONLIGHT
                static void CheckConnect (SocketAsyncEventArgs e)
                {
                        // NO check is made whether e != null in MS.NET (NRE is thrown in such case)