MCPcopy Create free account
hub / github.com/python-websockets/websockets / at_eof

Method at_eof

src/websockets/streams.py:99–113  ·  view source on GitHub ↗

Tell whether the stream has ended and all data was read. This is a generator-based coroutine.

(self)

Source from the content-addressed store, hash-verified

97 return r
98
99 def at_eof(self) -> Generator[None, None, bool]:
100 """
101 Tell whether the stream has ended and all data was read.
102
103 This is a generator-based coroutine.
104
105 """
106 while True:
107 if self.buffer:
108 return False
109 if self.eof:
110 return True
111 # When all data was read but the stream hasn't ended, we can't
112 # tell if until either feed_data() or feed_eof() is called.
113 yield
114
115 def feed_data(self, data: bytes | bytearray) -> None:
116 """

Callers 12

parse_handshakeFunction · 0.95
parse_frameFunction · 0.95
benchmark_streamFunction · 0.95
benchmark_burstFunction · 0.95
decodeMethod · 0.95
sent_framesMethod · 0.95
parseMethod · 0.45
discardMethod · 0.45

Calls

no outgoing calls

Tested by 6

decodeMethod · 0.76
sent_framesMethod · 0.76