twisted :: protocols :: amp :: AmpBox :: Class AmpBox
[hide private]
[frames] | no frames]

Class AmpBox

object --+    
         |    
      dict --+
             |
            AmpBox

I am a packet in the AMP protocol, much like a regular str:str dictionary.

Instance Methods [hide private]
a shallow copy of D
copy(self)
Return another AmpBox just like me.
 
serialize(self)
Convert me into a wire-encoded string.
 
_sendTo(self, proto)
Serialize and send this box to a Amp instance.
 
__repr__(self)
repr(x)

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __init__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __setitem__, __sizeof__, clear, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values, viewitems, viewkeys, viewvalues

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

copy(self)

 

Return another AmpBox just like me.

Returns: a shallow copy of D
Overrides: dict.copy

serialize(self)

 

Convert me into a wire-encoded string.

Returns:
a str encoded according to the rules described in the module docstring.

_sendTo(self, proto)

 

Serialize and send this box to a Amp instance. By the time it is being sent, several keys are required. I must have exactly ONE of:

   _ask
   _answer
   _error

If the '_ask' key is set, then the '_command' key must also be set.

Parameters:
  • proto - an AMP instance.

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)