using System.IO;
using System.Runtime.InteropServices;
-#if !NET_2_1
+#if !NET_2_1 || MOBILE
using System.Timers;
using System.Threading;
#endif
{
}
- public NetworkStream (Socket socket, bool owns_socket)
- : this (socket, FileAccess.ReadWrite, owns_socket)
+ public NetworkStream (Socket socket, bool ownsSocket)
+ : this (socket, FileAccess.ReadWrite, ownsSocket)
{
}
{
}
- 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");
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;
}
}
-#if !NET_2_1
+#if !NET_2_1 || MOBILE
#if TARGET_JVM
[MonoNotSupported ("Not supported since Socket.ReceiveTimeout is not supported")]
#endif
}
}
-#if !NET_2_1
+#if !NET_2_1 || MOBILE
#if TARGET_JVM
[MonoNotSupported ("Not supported since Socket.SendTimeout is not supported")]
#endif
}
-#if !NET_2_1
+#if !NET_2_1 || MOBILE
public void Close (int timeout)
{
if (timeout < -1) {