Author: gonzalo
Date: 2006-06-30 11:40:56 -0400 (Fri, 30 Jun 2006)
New Revision: 62157
Modified:
trunk/mcs/class/System/System.Net.Sockets/ChangeLog
trunk/mcs/class/System/System.Net.Sockets/MulticastOption.cs
trunk/mcs/class/System/System.Net.Sockets/Socket.cs
Log:
2006-06-30 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* Socket.cs: patch from Sanghyeon Seo that implements
(Send|Receive)Timeout for 2.0.
* MulticastOption.cs: more 2.0 stuff.
Modified: trunk/mcs/class/System/System.Net.Sockets/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Net.Sockets/ChangeLog 2006-06-30 14:50:07 UTC
(rev 62156)
+++ trunk/mcs/class/System/System.Net.Sockets/ChangeLog 2006-06-30 15:40:56 UTC
(rev 62157)
@@ -1,3 +1,9 @@
+2006-06-30 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+ * Socket.cs: patch from Sanghyeon Seo that implements
+ (Send|Receive)Timeout for 2.0.
+ * MulticastOption.cs: more 2.0 stuff.
+
2006-06-28 Atsushi Enomoto <[EMAIL PROTECTED]>
* Socket.cs : use ConfigurationManager.GetSection() under NET_2_0.
Modified: trunk/mcs/class/System/System.Net.Sockets/MulticastOption.cs
===================================================================
--- trunk/mcs/class/System/System.Net.Sockets/MulticastOption.cs
2006-06-30 14:50:07 UTC (rev 62156)
+++ trunk/mcs/class/System/System.Net.Sockets/MulticastOption.cs
2006-06-30 15:40:56 UTC (rev 62157)
@@ -42,13 +42,22 @@
// changing socket-io.c in the runtime
private IPAddress group;
private IPAddress local;
+#if NET_2_0
+ int iface_index;
+#endif
public MulticastOption (IPAddress grp)
: this (grp, IPAddress.Any)
{
group = grp;
}
-
+#if NET_2_0
+ [MonoTODO ("Get interface IP from interface index")]
+ public MulticastOption (IPAddress group, int interfaceIndex)
+ {
+ this.group = group;
+ }
+#endif
public MulticastOption (IPAddress grp, IPAddress addr)
{
if (grp == null)
@@ -61,16 +70,22 @@
local = addr;
}
- public IPAddress Group
- {
+ public IPAddress Group {
get { return group; }
set { group = value; }
}
- public IPAddress LocalAddress
- {
+ public IPAddress LocalAddress {
get { return local; }
set { local = value; }
}
+
+#if NET_2_0
+ public int InterfaceIndex {
+ get { return iface_index; }
+ set { iface_index = value; }
+ }
+#endif
}
}
+
Modified: trunk/mcs/class/System/System.Net.Sockets/Socket.cs
===================================================================
--- trunk/mcs/class/System/System.Net.Sockets/Socket.cs 2006-06-30 14:50:07 UTC
(rev 62156)
+++ trunk/mcs/class/System/System.Net.Sockets/Socket.cs 2006-06-30 15:40:56 UTC
(rev 62157)
@@ -702,23 +702,29 @@
}
#if NET_2_0
- [MonoTODO]
public int SendTimeout {
get {
- throw new NotImplementedException ();
+ return (int)GetSocketOption(
+ SocketOptionLevel.Socket,
+ SocketOptionName.SendTimeout);
}
set {
- throw new NotImplementedException ();
+ SetSocketOption(
+ SocketOptionLevel.Socket,
+ SocketOptionName.SendTimeout, value);
}
}
- [MonoTODO]
public int ReceiveTimeout {
get {
- throw new NotImplementedException ();
+ return (int)GetSocketOption(
+ SocketOptionLevel.Socket,
+ SocketOptionName.ReceiveTimeout);
}
set {
- throw new NotImplementedException ();
+ SetSocketOption(
+ SocketOptionLevel.Socket,
+ SocketOptionName.ReceiveTimeout, value);
}
}
#endif
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches