class_docstr: A socket-like wrapper for exposing real transport sockets.
  
  These objects can be safely returned by APIs like
  `transport.get_extra_info('socket')`.  All potentially disruptive
  operations (like "socket.close()") are banned.
class_docstr_tok: ["A","socket-like","wrapper","for","exposing","real","transport","sockets",".","These","objects","can","be","safely","returned","by","APIs","like","`","transport.get_extra_info","(","'socket","'",")","`",".","All","potentially","disruptive","operations","(","like","``","socket.close","(",")","''",")","are","banned","."]
code: def __repr__(self):
      s = (
          f"<asyncio.TransportSocket fd={self.fileno()}, "
          f"family={self.family!s}, type={self.type!s}, "
          f"proto={self.proto}"
      )
  
      if self.fileno() != -1:
          try:
              laddr = self.getsockname()
              if laddr:
                  s = f"{s}, laddr={laddr}"
          except socket.error:
              pass
          try:
              raddr = self.getpeername()
              if raddr:
                  s = f"{s}, raddr={raddr}"
          except socket.error:
              pass
  
      return f"{s}>"
  
file_path: cpython/Lib/asyncio/trsock.py
imports: import socket
label_desc: Use image node_id 5 for calling the TransportSocket obj's underlying member method code with example usage: obj.__repr__() and returns: s, str