using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.ComponentModel;
using System.Data;
using System.Threading;
using System.IO;
namespace TESt
{
    class Program
    {
        
        static void Main(string[] args)
        {
            byte[] daten = new byte[120000];
            byte[] daten2 = new byte[60000];
            byte[] daten3 = new byte[60000];
            UdpClient udpclient = new UdpClient(11000);
            udpclient.Connect("169.254.123.79", 11000);
            IPEndPoint ipendpoint = new IPEndPoint(IPAddress.Any, 0);
            try
            {
                daten2 = udpclient.Receive(ref ipendpoint);
                daten3 = udpclient.Receive(ref ipendpoint);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
            for (int i = 0; i < 60000; i++)
            {
                daten[i] = daten2[i];
                daten[i + 60000] = daten3[i];
            }
            FileStream fstream = new FileStream("R2D2.jpeg", FileMode.Create);
            fstream.Write(daten, 0, daten.Length);
        }
    }
}
