Esempio n. 1
0
 public void Add(PPacket packet)
 {
     if (packet.Tcp == null)
         return;
     TcpStreamPacket streamPacket = new TcpStreamPacket(packet);
     int i = _streams.IndexOfKey(streamPacket.Connection);
     TcpStream0 stream;
     if (i == -1)
     {
         stream = new TcpStream0();
         stream.StreamNumber = _streams.Count + 1;
         _streams.Add(streamPacket.Connection, stream);
     }
     else
     {
         stream = _streams.Values[i];
     }
     streamPacket.StreamNumber = stream.StreamNumber;
     stream.Add(streamPacket);
     _packets.Add(streamPacket);
 }
Esempio n. 2
0
        public void Add(PPacket packet)
        {
            if (packet.Tcp == null)
            {
                return;
            }
            TcpStreamPacket streamPacket = new TcpStreamPacket(packet);
            int             i            = _streams.IndexOfKey(streamPacket.Connection);
            TcpStream0      stream;

            if (i == -1)
            {
                stream = new TcpStream0();
                stream.StreamNumber = _streams.Count + 1;
                _streams.Add(streamPacket.Connection, stream);
            }
            else
            {
                stream = _streams.Values[i];
            }
            streamPacket.StreamNumber = stream.StreamNumber;
            stream.Add(streamPacket);
            _packets.Add(streamPacket);
        }