Skip to content

Commit f5aabde

Browse files
Update using-udp-services.md
Set s.EnableBroadcast to true to avoid exception System.Net.Sockets.SocketException (13): Permission denied
1 parent 6b2c951 commit f5aabde

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/framework/network-programming/using-udp-services.md

+1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ class Program
141141
static void Main(string[] args)
142142
{
143143
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
144+
s.EnableBroadcast = true;
144145

145146
IPAddress broadcast = IPAddress.Parse("192.168.1.255");
146147

0 commit comments

Comments
 (0)