Package dpkt :: Module http :: Class Message
[show private | hide private]
[frames | no frames]

Type Message

object --+    
         |    
    Packet --+
             |
            Message

Known Subclasses:
Request, Response

Hypertext Transfer Protocol headers + body.

Method Summary
  __init__(self, *args, **kwargs)
Packet constructor with ([buf], [field=val,...]) prototype.
  __len__(self)
  __str__(self)
  pack_hdr(self)
Return packed header string.
  unpack(self, buf)
Unpack packet header fields from buf, and set self.data.
    Inherited from Packet
  __getitem__(self, k)
  __repr__(self)
  pack(self)
Return packed header + self.data string.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...

Class Variable Summary
dict __hdr_defaults__ = {}
type __metaclass__ = __builtin__.type
NoneType body = None                                                                  
NoneType headers = None                                                                  

Method Details

__init__(self, *args, **kwargs)
(Constructor)

Packet constructor with ([buf], [field=val,...]) prototype.

Arguments:

buf -- optional packet buffer to unpack

Optional keyword arguments correspond to members to set
(matching fields in self.__hdr__, or 'data').
Overrides:
dpkt.dpkt.Packet.__init__ (inherited documentation)

pack_hdr(self)

Return packed header string.
Overrides:
dpkt.dpkt.Packet.pack_hdr (inherited documentation)

unpack(self, buf)

Unpack packet header fields from buf, and set self.data.
Overrides:
dpkt.dpkt.Packet.unpack (inherited documentation)

Class Variable Details

__hdr_defaults__

Type:
dict
Value:
{}                                                                     

body

Type:
NoneType
Value:
None                                                                  

headers

Type:
NoneType
Value:
None                                                                  

Generated by Epydoc 2.1 on Sun Oct 1 11:24:13 2006 http://epydoc.sf.net