Esempio n. 1
0
        /// <summary>
        /// Needs to be called to read data from the underlaying network and update this class.
        ///
        /// Use Dequeue to get the events it read.
        /// </summary>
        public virtual void Update()
        {
            CAPI.Unity_WebRtcNetwork_Update(mReference);

            NetworkEvent ev = new NetworkEvent();

            //DequeueInternal will read the message from js, change the state of this object
            //e.g. if a server is successfully opened it will set mIsServer to true
            while (DequeueInternal(out ev))
            {
                //add it for delivery to the user
                mEvents.Enqueue(ev);
            }
        }