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

Method feed_data

src/websockets/streams.py:115–130  ·  view source on GitHub ↗

Write data to the stream. :meth:`feed_data` cannot be called after :meth:`feed_eof`. Args: data: Data to write. Raises: EOFError: If the stream has ended.

(self, data: bytes | bytearray)

Source from the content-addressed store, hash-verified

113 yield
114
115 def feed_data(self, data: bytes | bytearray) -> None:
116 """
117 Write data to the stream.
118
119 :meth:`feed_data` cannot be called after :meth:`feed_eof`.
120
121 Args:
122 data: Data to write.
123
124 Raises:
125 EOFError: If the stream has ended.
126
127 """
128 if self.eof:
129 raise EOFError("stream ended")
130 self.buffer += data
131
132 def feed_eof(self) -> None:
133 """

Callers 15

parse_handshakeFunction · 0.95
parse_frameFunction · 0.95
benchmark_streamFunction · 0.95
benchmark_burstFunction · 0.95
read_connect_responseFunction · 0.95
parseMethod · 0.95
decodeMethod · 0.95
sent_framesMethod · 0.95
test_one_inputFunction · 0.95
test_one_inputFunction · 0.95
test_one_inputFunction · 0.95
data_receivedMethod · 0.45

Calls

no outgoing calls

Tested by 15

parseMethod · 0.76
decodeMethod · 0.76
sent_framesMethod · 0.76
test_one_inputFunction · 0.76
test_one_inputFunction · 0.76
test_one_inputFunction · 0.76
test_read_lineMethod · 0.36
test_read_exactMethod · 0.36