示例#1
0
        public MulticastBroadcaster(MulticastSettings settings, bool autoBindJoinConnect = true)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            Settings = settings;

            if (autoBindJoinConnect)
            {
                BindJoinConnect();
            }
        }
示例#2
0
        public MulticastListener(MulticastSettings settings, bool autoBindJoinConnect = true)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            Settings = settings;

            if (autoBindJoinConnect)
            {
                BindAndJoin();
            }

            _receiveTask = new Task(StartReceiving, TaskCreationOptions.LongRunning);
            _receiveTask.Start();

            _onNextingTask = new Task(StartOnNexting, TaskCreationOptions.LongRunning);
            _onNextingTask.Start();
        }