示例#1
0
 /// <summary>
 /// Initializes a new instance of the RtmpContext class.
 /// </summary>
 /// <param name="mode"></param>
 public RtmpContext(RtmpMode mode)
 {
     //_mode = mode;
     _readerWriterLock = new FastReaderWriterLock();
     SetMode(mode);
     _objectEncoding = ObjectEncoding.AMF0;
 }
示例#2
0
 internal void SetMode(RtmpMode value)
 {
     __fields = value == RtmpMode.Client ? (byte)(__fields | 4) : (byte)(__fields & ~4);
 }
示例#3
0
        /// <summary>
        /// Initializes a new instance of the RtmpContext class.
        /// </summary>
        /// <param name="mode"></param>
        public RtmpContext(RtmpMode mode)
		{
			//_mode = mode;
            _readerWriterLock = new FastReaderWriterLock();
            SetMode(mode);
			_objectEncoding = ObjectEncoding.AMF0;
		}
示例#4
0
 internal void SetMode(RtmpMode value)
 {
     __fields = value == RtmpMode.Client ? (byte)(__fields | 4) : (byte)(__fields & ~4);
 }
示例#5
0
		internal RtmpConnection(IRtmpHandler handler, RtmpMode mode, string path, IDictionary parameters)
			: base(path, parameters) {
			_handler = handler;
			_channels = new CopyOnWriteDictionary<int, RtmpChannel>(4);
			_streams = new CopyOnWriteDictionary<int, IClientStream>();
			_pendingVideos = new CopyOnWriteDictionary<int, AtomicInteger>();
			_streamCount = new AtomicInteger();
			_streamBuffers = new CopyOnWriteDictionary<int, int>();
			_reservedStreams = new BitArray(0);
			_pendingCalls = new CopyOnWriteDictionary<int, IServiceCall>();
			// We start with an anonymous connection without a scope.
			// These parameters will be set during the call of "connect" later.
			_context = new RtmpContext(mode);
			//Transaction id depends on server/client mode
			//When server mode is set we cannot push messages with transaction id = 1 (connect)
			_invokeId = mode == RtmpMode.Server ? new AtomicInteger(1) : new AtomicInteger(0);
		}
示例#6
0
 internal RtmpContext(RtmpMode mode)
 {
     this._mode           = mode;
     this._objectEncoding = FluorineFx.ObjectEncoding.AMF0;
 }
示例#7
0
 internal void SetMode(RtmpMode value)
 {
     this._mode = value;
 }