Esempio n. 1
0
        public SubtConnectedPeerStream(IConnectedPeerStream stream, SubtLocalPeer subtLocalPeer, SubtConnectedPeer subtConnectedPeer)
        {
            SubtConnectedPeer = subtConnectedPeer;
            SubtLocalPeer     = subtLocalPeer;
            _stream           = stream;
            InitializePayloadPacket();

            _txSequence    = (ushort)subtLocalPeer.LocalPeer.Random.Next(ushort.MaxValue);
            _rxMeasurement = new RxMeasurement(subtLocalPeer, this);

            _senderThread = subtLocalPeer.SenderThreadForNewStream;
            _senderThread.OnCreatedDestroyedStream(this, true);
        }
Esempio n. 2
0
        public SubtConnectedPeerStream(IConnectedPeerStream stream, SubtLocalPeer subtLocalPeer, SubtConnectedPeer subtConnectedPeer)
        {
            SubtConnectedPeer = subtConnectedPeer;
            SubtLocalPeer     = subtLocalPeer;
            _stream           = stream;
            InitializePayloadPacket();

            _txSequence    = (ushort)subtLocalPeer.LocalPeer.Random.Next(ushort.MaxValue);
            _rxMeasurement = new RxMeasurement(subtLocalPeer, this);

            if (subtLocalPeer.LocalPeer.Configuration.RoleAsUser)
            {
                TargetTxBandwidth = SubtLogicConfiguration.BandwidthForStreams_UserInitial;
            }

            _senderThread = subtLocalPeer.SenderThreadForNewStream;
            _senderThread.OnCreatedDestroyedStream(this, true);
        }