コード例 #1
0
ファイル: AlpnFacts.cs プロジェクト: Drawaes/Leto2
        public void ClientPriorityUsedFact()
        {
            var provider         = new ApplicationLayerProtocolProvider(false, ApplicationLayerProtocolType.Http2_Tls, ApplicationLayerProtocolType.Http1_1);
            var selectedProtocol = provider.ProcessExtension(new BigEndianAdvancingSpan(_httpOneAndTwoWithTls));

            Assert.Equal(ApplicationLayerProtocolType.Http1_1, selectedProtocol);
        }
コード例 #2
0
ファイル: AlpnFacts.cs プロジェクト: Drawaes/Leto2
        public void InvalidVectorLength()
        {
            var provider = new ApplicationLayerProtocolProvider(false, ApplicationLayerProtocolType.Spdy2);

            Assert.Throws <Alerts.AlertException>(() =>
            {
                var selectedProtocol = provider.ProcessExtension(new BigEndianAdvancingSpan(_badVectorLength));
            });
        }
コード例 #3
0
ファイル: AlpnFacts.cs プロジェクト: Drawaes/Leto2
        public void NoProtocolMatchesFact()
        {
            var provider = new ApplicationLayerProtocolProvider(false, ApplicationLayerProtocolType.Spdy2);

            Assert.Throws <Alerts.AlertException>(() =>
            {
                var selectedProtocol = provider.ProcessExtension(new BigEndianAdvancingSpan(_httpOneAndTwoWithTls));
            });
        }