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

Class ServerOpExtensionFactory

tests/extensions/utils.py:37–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36
37class ServerOpExtensionFactory:
38 name = "x-op"
39
40 def __init__(self, op=None):
41 self.op = op
42
43 def process_request_params(self, params, accepted_extensions):
44 if params != [("op", self.op)]:
45 raise NegotiationError()
46 return [("op", self.op)], OpExtension(self.op)
47
48
49class NoOpExtension:

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…