Bad Broadcast : Broadcast : Network C# Source Code


Custom Search

C# Source Code » Network » Broadcast »

 

Bad Broadcast








    


using System;
using System.Net;
using System.Net.Sockets;
using System.Text;

public class BadBroadcast {
   public static void Main()
   {
      Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
      IPEndPoint iep = new IPEndPoint(IPAddress.Broadcast, 9050);

      byte[] data = Encoding.ASCII.GetBytes("This is a test message");
      sock.SendTo(data, iep);
      sock.Close();
   }
}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Network
» Broadcast