def sendEOF(self, channel):
        """
        Send an EOF (End of File) for a channel.

        @type channel:  subclass of L{SSHChannel}
        """
        if channel.localClosed:
            return # we're already closed
        log.msg('sending eof')
        self.transport.sendPacket(MSG_CHANNEL_EOF, struct.pack('>L',
                                    self.channelsToRemoteChannel[channel]))

        Send an EOF (End of File) for a channel.

        @type channel:  subclass of L{SSHChannel}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/ssh/connection.py