Beispiel #1
0
        public VoiceNetwork(string address)
        {
            dataSender   = new UdpSender(address, 11000);
            dataReceiver = new UdpReceiver(address, 11000);

            dataReceiver.DataArrived += delegate(byte[] data, string senderIP)
            {
                OnIncomeVoiceAvailable(data);
            };
        }
Beispiel #2
0
        public P2PNetwork()
        {
            networkInfo = new NetworkInfo();

            sender                = new UdpSender(networkInfo.BroadcastIP, 11001);
            receiver              = new UdpReceiver(11001);
            receiver.DataArrived += delegate(byte[] data, string senderIP)
            {
                string message = Encoding.ASCII.GetString(data);
                ProcessMessage(message, senderIP);
            };
        }