Преглед изворни кода

2005-02-23 Dick Porter <[email protected]>

        * UdpClient.cs: Set the Broadcast option, as apparently the MS
        runtime defaults make UDP sockets broadcastable.



svn path=/trunk/mcs/; revision=41097
Dick Porter пре 21 година
родитељ
комит
10f8900a5c

+ 5 - 0
mcs/class/System/System.Net.Sockets/ChangeLog

@@ -1,3 +1,8 @@
+2005-02-23  Dick Porter  <[email protected]>
+
+	* UdpClient.cs: Set the Broadcast option, as apparently the MS
+	runtime defaults make UDP sockets broadcastable.
+
 2004-12-28 Gonzalo Paniagua Javier <[email protected]>
 
 	* Socket.cs: for Receive*/Send*, don't set the connected status to false

+ 1 - 0
mcs/class/System/System.Net.Sockets/UdpClient.cs

@@ -118,6 +118,7 @@ namespace System.Net.Sockets
 
 			socket = new Socket (family, SocketType.Dgram, ProtocolType.Udp);
 
+			socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1);
 			if (localEP != null)
 				socket.Bind (localEP);
 		}