class documentation

class Command:

Constructor: Command(command, **kwargs)

View In Hierarchy

Wrap a client action into an object, that holds the values used in the protocol.

Method __init__ Create a command.
Method fail Make the underlying deferred fails.
Method success Shortcut method to fire the underlying deferred.
Instance Variable command name of the command sent to the server.
Instance Variable _deferred the Deferred object that will be fired when the result arrives.
def __init__(self, command, **kwargs):

Create a command.

Parameters
command:bytesthe name of the command.
**kwargsthis values will be stored as attributes of the object for future use
def fail(self, error):

Make the underlying deferred fails.

def success(self, value):

Shortcut method to fire the underlying deferred.

command: bytes =

name of the command sent to the server.

_deferred: Deferred =

the Deferred object that will be fired when the result arrives.