def createInternetSocket(self):
        """(internal) Create a non-blocking socket using
        self.addressFamily, self.socketType.
        """
        s = socket.socket(self.addressFamily, self.socketType)
        s.setblocking(0)
        fdesc._setCloseOnExec(s.fileno())
        return s
(internal) Create a non-blocking socket using
        self.addressFamily, self.socketType.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/tcp.py