MCPcopy
hub / github.com/scrapy/scrapy / H2ClientFactory

Class H2ClientFactory

scrapy/core/http2/protocol.py:460–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458
459@implementer(IProtocolNegotiationFactory)
460class H2ClientFactory(Factory):
461 def __init__(
462 self,
463 uri: URI,
464 settings: Settings,
465 conn_lost_deferred: Deferred[list[BaseException]],
466 *,
467 tls_verbose_logging: bool = False,
468 ) -> None:
469 self.uri = uri
470 self.settings = settings
471 self.conn_lost_deferred = conn_lost_deferred
472 self.tls_verbose_logging = tls_verbose_logging
473
474 def buildProtocol(self, addr: IAddress) -> H2ClientProtocol:
475 return H2ClientProtocol(
476 self.uri,
477 self.settings,
478 self.conn_lost_deferred,
479 tls_verbose_logging=self.tls_verbose_logging,
480 )
481
482 def acceptableProtocols(self) -> list[bytes]:
483 return [PROTOCOL_NAME]

Callers 2

_new_connectionMethod · 0.90
clientMethod · 0.90

Calls

no outgoing calls

Tested by 1

clientMethod · 0.72