Method
recv
(self, n=0, options=socket.MsgFlag(0))
Source from the content-addressed store, hash-verified
| 216 | pass |
| 217 | |
| 218 | def recv(self, n=0, options=socket.MsgFlag(0)): |
| 219 | # type: (Optional[int], socket.MsgFlag) -> Optional[_T] |
| 220 | if self.closed: |
| 221 | raise EOFError |
| 222 | if options & socket.MSG_PEEK: |
| 223 | if self.__queue: |
| 224 | return self.__queue[0] |
| 225 | return None |
| 226 | os.read(self.__rd, 1) |
| 227 | elt = self.__queue.popleft() |
| 228 | if WINDOWS and not self.__queue: |
| 229 | self._winreset() |
| 230 | return elt |
| 231 | |
| 232 | def read(self, n=0): |
| 233 | # type: (Optional[int]) -> Optional[_T] |
Tested by
no test coverage detected