Home | Trees | Indices | Help |
|
---|
|
object --+ | AddrStrategy --+ | IPv4Strategy
An optimised AddrStrategy for IP version 4 address processing.
It uses the struct module's pack() and unpack() along with the socket module's inet_ntoa() and inet_aton() functions making it almost 2.5 times faster than a standard AddrStrategy configured for processing IPv4.
However, bear in mind that these modules might not be available everywhere. Runtimes such as Google App Engine gut the socket module. struct is also limited to processing 32-bit integer which is fine here but isn't suitable for 128-bit IPv6 processing.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Properties | |
Inherited from |
Method Details |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
Returns a network byte order integer that is equivalent to value represented by the IPv4 dotted decimal address string.
|
Returns an IPv4 dotted decimal address string that is equivalent to value represented by a 32 bit integer in network byte order.
|
Returns an integer word (octet) sequence that is equivalent to value represented by network byte order integer.
|
Returns a network byte order integer that is equivalent to value represented by word (octet) sequence.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jul 15 22:47:11 2008 | http://epydoc.sourceforge.net |