Share video stream via UDP c#

I am trying to write C# UDP client server that send video stream in live.

I have been search all over the internet for help/ example code for this issue.

I know who to send string between client and server but not to send video stream.

I would like to get help from you who to do it.

My code for now is that:


private void Button_Click(object sender, RoutedEventArgs e)
    UdpClient c = new UdpClient();
    IPEndPoint ep = new IPEndPoint(IPAddress.Parse(getMyIp()), 123);
    var data = Encoding.ASCII.GetBytes(textBoxaaa.Text);
    c.Send(data, data.Length);

private static string getMyIp()
    var host = Dns.GetHostEntry(Dns.GetHostName());
    foreach (var ip in host.AddressList)
    if (ip.AddressFamily == AddressFamily.InterNetwork)
        return ip.ToString();
     throw new Exception("Local IP Address Not Found!");


Server server = new Server();
HandleDataClass hdc = new HandleDataClass();

Thread serverThread = new Thread(() => server.Listen());

Thread dataHandleThread = new Thread(() => hdc.SubsribeToEvent(server));

while (true)

public void Listen()
    UdpClient listener = new UdpClient(123);
    IPEndPoint serverEP = new IPEndPoint(IPAddress.Any, 123);

    while (true)
       byte[] data = listener.Receive(ref serverEP);
       RaiseDataReceived(new ReceivedDataArgs(serverEP.Address, serverEP.Port, data));

public delegate void DataReceived(object sender, ReceivedDataArgs args);

public event DataReceived DataReceivedEvent;

private void RaiseDataReceived(ReceivedDataArgs args)
    if (DataReceivedEvent != null)
        DataReceivedEvent(this, args);

public class ReceivedDataArgs
    public IPAddress IpAddress { get; set; }
    public int port { get; set; }
    public byte[] ReceivedBytes;

    public ReceivedDataArgs(IPAddress ip, int port, byte[] data)
        this.IpAddress = ip;
        this.port = port;
        this.ReceivedBytes = data;

public void SubsribeToEvent(Server server)
    server.DataReceivedEvent += server_DataReceivedEvent;

void server_DataReceivedEvent(object sender, Server.ReceivedDataArgs args)
    MessageBox.Show("Received message from ["+args.IpAddress.ToString()+
            " : "+args.port.ToString()+"]:\r\n"+Encoding.ASCII.GetString(args.ReceivedBytes));

Thanks' for your help!!!