internal void AddEvent(QuicEvent evt) { switch (evt.ObjectType) { case QuicObjectType.Global: if (evt.EventId >= QuicEventId.ApiEnter && evt.EventId <= QuicEventId.ApiExitStatus) { DataAvailableFlags |= QuicDataAvailableFlags.Api; } break; case QuicObjectType.Worker: DataAvailableFlags |= QuicDataAvailableFlags.Worker; WorkerSet.FindOrCreateActive(evt).AddEvent(evt, this); break; case QuicObjectType.Connection: DataAvailableFlags |= QuicDataAvailableFlags.Connection; var Conn = ConnectionSet.FindOrCreateActive(evt); Conn.AddEvent(evt, this); LastConnections[evt.ThreadId] = Conn; break; case QuicObjectType.Stream: DataAvailableFlags |= QuicDataAvailableFlags.Stream; StreamSet.FindOrCreateActive(evt).AddEvent(evt, this); break; case QuicObjectType.Datapath: DatapathSet.FindOrCreateActive(evt).AddEvent(evt, this); if (evt.EventId == QuicEventId.DatapathSend && LastConnections.TryGetValue(evt.ThreadId, out var LastConn)) { LastConn.AddEvent(evt, this); } break; default: break; } Events.Add(evt); }
internal void AddEvent(QuicEvent evt) { switch (evt.ObjectType) { case QuicObjectType.Global: if (evt.EventId >= QuicEventId.ApiEnter && evt.EventId <= QuicEventId.ApiExitStatus) { DataAvailableFlags |= QuicDataAvailableFlags.Api; } break; case QuicObjectType.Worker: DataAvailableFlags |= QuicDataAvailableFlags.Worker; WorkerSet.FindOrCreateActive(new QuicObjectKey(evt)).AddEvent(evt, this); break; case QuicObjectType.Connection: DataAvailableFlags |= QuicDataAvailableFlags.Connection; ConnectionSet.FindOrCreateActive(new QuicObjectKey(evt)).AddEvent(evt, this); break; case QuicObjectType.Stream: DataAvailableFlags |= QuicDataAvailableFlags.Stream; StreamSet.FindOrCreateActive(new QuicObjectKey(evt)).AddEvent(evt, this); break; case QuicObjectType.Datapath: DatapathSet.FindOrCreateActive(new QuicObjectKey(evt)).AddEvent(evt, this); break; default: break; } Events.Add(evt); }
internal QuicConnection FindOrCreateConnection(QuicObjectKey key) { return(ConnectionSet.FindOrCreateActive(key)); }