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

Method __init__

scapy/supersocket.py:466–476  ·  view source on GitHub ↗
(self,
                 sock,  # type: socket.socket
                 basecls=None,  # type: Optional[Type[Packet]]
                 )

Source from the content-addressed store, hash-verified

464 desc = "transforms a stream socket into a layer 2"
465
466 def __init__(self,
467 sock, # type: socket.socket
468 basecls=None, # type: Optional[Type[Packet]]
469 ):
470 # type: (...) -> None
471 from scapy.sessions import streamcls
472 self.rcvcls = streamcls(basecls or conf.raw_layer)
473 self.metadata: Dict[str, Any] = {}
474 self.streamsession: Dict[str, Any] = {}
475 self._buf = b""
476 super(StreamSocket, self).__init__(sock, basecls=basecls)
477
478 def recv(self, x=None, **kwargs):
479 # type: (Optional[int], Any) -> Optional[Packet]

Callers

nothing calls this directly

Calls 2

streamclsFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected