MCPcopy Index your code
hub / github.com/secdev/scapy / recv

Method recv

scapy/automaton.py:218–230  ·  view source on GitHub ↗
(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]

Callers 9

readMethod · 0.95
clearMethod · 0.95
recvMethod · 0.45
readMethod · 0.45
recvMethod · 0.45
sendMethod · 0.45
_do_controlMethod · 0.45
_do_iterMethod · 0.45
runMethod · 0.45

Calls 2

_winresetMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected