コード例 #1
0
ファイル: local.py プロジェクト: mihaic/p2p-testframework
    def closeConnection(self, connection):
        """
        Close a previously created connection to the host.

        Any calls afterwards to methods of this host with the close connection will fail.

        @param  The connection to be closed.
        """
        if connection.closeIfNotClosed():
            return
        Campaign.debuglogger.closeChannel( 'local_{0}'.format(self.name) )
        host.closeConnection(self, connection)
コード例 #2
0
ファイル: ssh.py プロジェクト: mihaic/p2p-testframework
    def closeConnection(self, connection):
        """
        Close a previously created connection to the host.

        Any calls afterwards to methods of this host with the close connection will fail.
        
        The default implementation will close the connection if it wasn't already closed
        and remove it from self.connections.

        @param  The connection to be closed.
        """
        Campaign.debuglogger.closeChannel(connection.getIdentification())
        host.closeConnection(self, connection)
コード例 #3
0
    def closeConnection(self, connection):
        """
        Close a previously created connection to the host.

        Any calls afterwards to methods of this host with the close connection will fail.
        
        The default implementation will close the connection if it wasn't already closed
        and remove it from self.connections.

        @param  The connection to be closed.
        """
        # TODO: Actually close the connection. Then call host.closeConnection(connection). Example:
        #
        #    FIXME: WRITE EXAMPLE
        #
        # Always include the next call:
        host.closeConnection(self, connection)