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

Method encode

tests/legacy/test_framing.py:160–164  ·  view source on GitHub ↗
(frame)

Source from the content-addressed store, hash-verified

158 class Rot13:
159 @staticmethod
160 def encode(frame):
161 assert frame.opcode == OP_TEXT
162 text = frame.data.decode()
163 data = codecs.encode(text, "rot13").encode()
164 return dataclasses.replace(frame, data=data)
165
166 # This extensions is symmetrical.
167 @staticmethod

Callers

nothing calls this directly

Calls 2

decodeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected