(self)
| 28 | return self._sock.proto |
| 29 | |
| 30 | def __repr__(self): |
| 31 | s = ( |
| 32 | f"<asyncio.TransportSocket fd={self.fileno()}, " |
| 33 | f"family={self.family!s}, type={self.type!s}, " |
| 34 | f"proto={self.proto}" |
| 35 | ) |
| 36 | |
| 37 | if self.fileno() != -1: |
| 38 | try: |
| 39 | laddr = self.getsockname() |
| 40 | if laddr: |
| 41 | s = f"{s}, laddr={laddr}" |
| 42 | except socket.error: |
| 43 | pass |
| 44 | try: |
| 45 | raddr = self.getpeername() |
| 46 | if raddr: |
| 47 | s = f"{s}, raddr={raddr}" |
| 48 | except socket.error: |
| 49 | pass |
| 50 | |
| 51 | return f"{s}>" |
| 52 | |
| 53 | def __getstate__(self): |
| 54 | raise TypeError("Cannot serialize asyncio.TransportSocket object") |
nothing calls this directly
no test coverage detected