def connectionMade(self):
        """
        Send C{self.fd} and, if it is not L{None}, C{self.data}.  Then close the
        connection.
        """
        self.transport.sendFileDescriptor(self.fd)
        if self.data:
            self.transport.write(self.data)
        self.transport.loseConnection()

        Send C{self.fd} and, if it is not L{None}, C{self.data}.  Then close the
        connection.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_unix.py