MCPcopy Index your code
hub / github.com/python-websockets/websockets / ClientOpExtensionFactory

Class ClientOpExtensionFactory

tests/extensions/utils.py:22–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21
22class ClientOpExtensionFactory:
23 name = "x-op"
24
25 def __init__(self, op=None):
26 self.op = op
27
28 def get_request_params(self):
29 return [("op", self.op)]
30
31 def process_response_params(self, params, accepted_extensions):
32 if params != [("op", self.op)]:
33 raise NegotiationError()
34 return OpExtension(self.op)
35
36
37class ServerOpExtensionFactory:

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…