MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/asyncio/proactor_events.py:50–71  ·  view source on GitHub ↗
(self, loop, sock, protocol, waiter=None,
                 extra=None, server=None)

Source from the content-addressed store, hash-verified

48 """Base class for pipe and socket transports."""
49
50 def __init__(self, loop, sock, protocol, waiter=None,
51 extra=None, server=None):
52 super().__init__(extra, loop)
53 self._set_extra(sock)
54 self._sock = sock
55 self.set_protocol(protocol)
56 self._server = server
57 self._buffer = None # None or bytearray.
58 self._read_fut = None
59 self._write_fut = None
60 self._pending_write = 0
61 self._conn_lost = 0
62 self._closing = False # Set when close() called.
63 self._called_connection_lost = False
64 self._eof_written = False
65 if self._server is not None:
66 self._server._attach(self)
67 self._loop.call_soon(self._protocol.connection_made, self)
68 if waiter is not None:
69 # only wake up the waiter when connection_made() has been called
70 self._loop.call_soon(futures._set_result_unless_cancelled,
71 waiter, None)
72
73 def __repr__(self):
74 info = [self.__class__.__name__]

Callers

nothing calls this directly

Calls 6

_set_extraMethod · 0.95
set_protocolMethod · 0.95
superClass · 0.85
_attachMethod · 0.80
__init__Method · 0.45
call_soonMethod · 0.45

Tested by

no test coverage detected