Exemplo n.º 1
0
 /// <summary>
 /// new
 /// </summary>
 /// <param name="localEndPoint"></param>
 /// <param name="remoteEndPoint"></param>
 /// <param name="server"></param>
 /// <exception cref="ArgumentNullException">server is null</exception>
 public UdpSession(EndPoint localEndPoint, EndPoint remoteEndPoint, IUdpServer server)
 {
     if (server == null) throw new ArgumentNullException("server");
     this.LocalEndPoint = localEndPoint;
     this.RemoteEndPoint = remoteEndPoint;
     this._server = server;
 }
Exemplo n.º 2
0
 /// <summary>
 /// new
 /// </summary>
 /// <param name="remoteEndPoint"></param>
 /// <param name="server"></param>
 /// <exception cref="ArgumentNullException">server is null</exception>
 public UdpSession(EndPoint remoteEndPoint, IUdpServer server)
 {
     if (server == null)
     {
         throw new ArgumentNullException("server");
     }
     this.RemoteEndPoint = remoteEndPoint;
     this._server        = server;
 }
Exemplo n.º 3
0
        public MainPageViewModel(IUdpServer udpServer, IUdpClient udpClient, IWlanClient wlanClient)
        {
            _udpServer  = udpServer;
            _udpClient  = udpClient;
            _wlanClient = wlanClient;

            _udpServer.NewDataReceiveEvent += UdpServerOnNewDataReceiveEvent;
            _udpClient.StatusEvent         += UdpClientOnStatusEvent;

            StartCommand = new MvxCommand(StartCommandHander);
            StopCommand  = new MvxCommand(StopCommandHander);

            ShouldAlwaysRaiseInpcOnUserInterfaceThread(false); //Mvx需要关闭必须UI线程刷新

            TrySetSSID();
        }
Exemplo n.º 4
0
 public AudioBroadcaster(IUdpServer server)
 {
     _server     = server;
     _broadcasts = new ConcurrentDictionary <IPAddress, BroadcastPoint>();
 }