void MountProtocols(PeerConnection connection) { lock (protocols) { connection.AddProtocols(protocols); } }
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); }