+2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * Socket.cs: MS throws a SocketException in the byte[] overload when
+ the value is null.
+
2009-05-22 Sebastien Pouliot <sebastien@ximian.com>
* Socket_2_1.cs: Do not throw a SecurityException if the security
if (disposed && closed)
throw new ObjectDisposedException (GetType ().ToString ());
+ // I'd throw an ArgumentNullException, but this is what MS does.
+ if (opt_value == null)
+ throw new SocketException (10014, "Error trying to dereference an invalid pointer");
+
int error;
SetSocketOption_internal(socket, level, name, null,
if (disposed && closed)
throw new ObjectDisposedException (GetType ().ToString ());
+ // NOTE: if a null is passed, the byte[] overload is used instead...
if (opt_value == null)
throw new ArgumentNullException("opt_value");