Exemplo n.º 1
0
        public static void BeginReceviceBroadcast()
        {
            var server = new UdpClient(BROADCAST_PORT);

            server.EnableBroadcast = true;
            while (true)
            {
                var clientEndpoint = new IPEndPoint(IPAddress.Any, 0);
                var data           = server.Receive(ref clientEndpoint);
                ThreadEx.ExecTask(OnBroadcastReceived, clientEndpoint, data);
            }
        }
Exemplo n.º 2
0
 public static void Init()
 {
     ThreadEx.ExecThread(Channel.BeginReceviceBroadcast);
 }