Merge branch 'master' into msbuilddll2
[mono.git] / mcs / class / System / System.Net.Sockets / NetworkStream.cs
index b51e5050ce7cd9987c40c2c924a022834090ccd7..f358c4dbbc399654319507f7ad65da186dd9835f 100644 (file)
@@ -32,7 +32,7 @@
 
 using System.IO;
 using System.Runtime.InteropServices;
-#if !NET_2_1
+#if !NET_2_1 || MOBILE
 using System.Timers;
 using System.Threading;
 #endif
@@ -51,8 +51,8 @@ namespace System.Net.Sockets
                {
                }
 
-               public NetworkStream (Socket socket, bool owns_socket)
-                       : this (socket, FileAccess.ReadWrite, owns_socket)
+               public NetworkStream (Socket socket, bool ownsSocket)
+                       : this (socket, FileAccess.ReadWrite, ownsSocket)
                {
                }
 
@@ -61,7 +61,7 @@ namespace System.Net.Sockets
                {
                }
                
-               public NetworkStream (Socket socket, FileAccess access, bool owns_socket)
+               public NetworkStream (Socket socket, FileAccess access, bool ownsSocket)
                {
                        if (socket == null)
                                throw new ArgumentNullException ("socket is null");
@@ -73,7 +73,7 @@ namespace System.Net.Sockets
                                throw new IOException ("Operation not allowed on a non-blocking socket.");
                        
                        this.socket = socket;
-                       this.owns_socket = owns_socket;
+                       this.owns_socket = ownsSocket;
                        this.access = access;
 
                        readable = CanRead;
@@ -142,7 +142,7 @@ namespace System.Net.Sockets
                        }
                }
 
-#if !NET_2_1
+#if !NET_2_1 || MOBILE
 #if TARGET_JVM
                [MonoNotSupported ("Not supported since Socket.ReceiveTimeout is not supported")]
 #endif
@@ -178,7 +178,7 @@ namespace System.Net.Sockets
                        }
                }
 
-#if !NET_2_1
+#if !NET_2_1 || MOBILE
 #if TARGET_JVM
                [MonoNotSupported ("Not supported since Socket.SendTimeout is not supported")]
 #endif
@@ -267,7 +267,7 @@ namespace System.Net.Sockets
                }
                
 
-#if !NET_2_1
+#if !NET_2_1 || MOBILE
                public void Close (int timeout)
                {
                        if (timeout < -1) {