[Mono-bugs] [Bug 78146][Wis] New - Socket.SetSocketOption fails with Exception

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Apr 20 10:09:58 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by ccirstea at saguaronet.ro.

http://bugzilla.ximian.com/show_bug.cgi?id=78146

--- shadow/78146	2006-04-20 10:09:58.000000000 -0400
+++ shadow/78146.tmp.19044	2006-04-20 10:09:58.000000000 -0400
@@ -0,0 +1,91 @@
+Bug#: 78146
+Product: Mono: Runtime
+Version: 1.1
+OS: Solaris 8
+OS Details: Sparc Solaris 8
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: io-layer
+AssignedTo: dick at ximian.com                            
+ReportedBy: ccirstea at saguaronet.ro               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Summary: Socket.SetSocketOption fails with Exception
+
+Please fill in this template when reporting a bug, unless you know what you 
+are doing.
+Description of Problem:
+
+The SetSocketOption from System.Net.Socket throws SocketException.
+The message is: "Protocol option not supported".
+
+This exception is thrown no matter what options I'm setting.
+
+
+
+
+Steps to reproduce the problem:
+1. Run the following code
+
+using System;
+using System.Net.Sockets;
+
+namespace Sockets
+{
+	/// <summary>
+	/// Summary description for Class1.
+	/// </summary>
+	class Sock
+	{
+		/// <summary>
+		/// The main entry point for the application.
+		/// </summary>
+		[STAThread]
+		static void Main(string[] args)
+		{
+			Socket sock = new Socket(AddressFamily.InterNetwork, 
+									 SocketType.Stream, 
+									 ProtocolType.Tcp);
+
+			try
+			{
+				sock.SetSocketOption(SocketOptionLevel.Socket, 
+									SocketOptionName.
+ReceiveTimeout, 1);
+				System.Console.WriteLine("No error setting 
+options");
+			}
+			catch(Exception ex)
+			{
+				System.Console.WriteLine(ex.Message);
+				
+			}
+
+			System.Console.ReadLine();			
+
+		}
+	}
+}
+
+
+
+
+Actual Results:
+- SocketException
+- Win Socket Error Code = 10042
+- SocketException message = Protocol option not supported
+
+Expected Results:
+No exceptions thrown. The option should be set. 
+
+How often does this happen? 
+Always and for any socket options.
+
+Additional Information:
+
+I'm using the mono SVN version from (13.04.2006)
+The tests has been made also with Mono v 1.1.13.6 downloaded as a Sparc 
+package from mono download site. The results were the same


More information about the mono-bugs mailing list