Ejemplo n.º 1
0
 void MountProtocols(PeerConnection connection)
 {
     lock (protocols)
     {
         connection.AddProtocols(protocols);
     }
 }
Ejemplo n.º 2
0
        public void Protocols()
        {
            var connection = new PeerConnection();

            Assert.AreEqual(0, connection.Protocols.Count);

            connection.AddProtocol(new Identify1());
            Assert.AreEqual(1, connection.Protocols.Count);

            connection.AddProtocols(new IPeerProtocol[] { new Mplex67(), new Plaintext1() });
            Assert.AreEqual(3, connection.Protocols.Count);
        }