Package twisted :: Package protocols :: Module gnutella |
[show private | hide private]
[frames | no frames]

## Module twisted.protocols.gnutella

Gnutella, v0.4 http://www9.limewire.com/developer/gnutella_protocol_0.4.pdf

This module is incomplete. The "GnutellaTalker" class is complete. The "GnutellaPinger" and "GnutellaPonger" are complete and able to chat with one another. The "GnutellaRouter" and "GnutellaServent" classes are yet to be written.

Classes
`GnutellaPinger` | Just for testing.
`GnutellaPonger` | Just for testing.
`GnutellaRouter` | This is a well-behaved Gnutella servent that routes messages as it should.
`GnutellaTalker` | This just speaks the Gnutella protocol and translates it into Python methods for higher-level services to program with.

Function Summary
| ``is_ipv4`(s)` Return true if and only if s is a canonical IPv4 address
| `popTrailingNulls(s)`

Variable Summary
`str` | `ACKSTRING`
`str` | `CONNSTRING`
`SRE_Pattern` | `CONNSTRINGRE`
`int` | `DESCRIPTORLENGTH`
`int` | `false`
`str` | `HEADERENCODING`
`int` | `HEADERLENGTH`
`int` | `MAXUINT16`
`long` | `MAXUINT32`
`int` | `MAXUINT8`
`int` | `OURMAXPAYLOADLENGTH`
`str` | `PARTIALQUERYHITPAYLOADENCODING`
`int` | `PARTIALQUERYHITPAYLOADLENGTH`
`str` | `PARTIALQUERYHITRESULTENCODING`
`int` | `PARTIALQUERYHITRESULTLENGTH`
`dict` | `payloadDescriptor2Name`
`str` | `PAYLOADENCODING`
`int` | `PAYLOADLENGTHLENGTH`
`int` | `PAYLOADLENGTHOFFSET`
`int` | `PINGPD`
`str` | `PONGPAYLOADENCODING`
`int` | `PONGPD`
`str` | `PUSHPAYLOADENCODING`
`int` | `PUSHPD`
`int` | `QUERYHITPD`
`int` | `QUERYPD`
`SelectReactor` | `reactor`
`str` | `SERVENTIDENTIFIERENCODING`
`int` | `true`

Function Details

### is_ipv4(s) Returns: true if and only if s is a canonical IPv4 address

Variable Details

    ### ACKSTRING Type: `str` Value:
        'GNUTELLA OK'

    ### CONNSTRING Type: `str` Value:
        'GNUTELLA CONNECT/0.4'

    ### CONNSTRINGRE Type: `SRE_Pattern` Value:
        ^GNUTELLA CONNECT/([^\r\n]*)

    ### DESCRIPTORLENGTH Type: `int` Value:
        16

    ### false Type: `int` Value:
        0

    ### HEADERENCODING Type: `str` Value:
        '<16sBBBI'

    ### HEADERLENGTH Type: `int` Value:
        23

    ### MAXUINT16 Type: `int` Value:
        65535

    ### MAXUINT32 Type: `long` Value:
        4294967295L

    ### MAXUINT8 Type: `int` Value:
        255

    ### OURMAXPAYLOADLENGTH Type: `int` Value:
        655360

    ### PARTIALQUERYHITPAYLOADENCODING Type: `str` Value:
        '<BHBBBBI'

    ### PARTIALQUERYHITPAYLOADLENGTH Type: `int` Value:
        11

    ### PARTIALQUERYHITRESULTENCODING Type: `str` Value:
        '<II'

    ### PARTIALQUERYHITRESULTLENGTH Type: `int` Value:
        8

    ### payloadDescriptor2Name Type: `dict` Value:
        {0: 'Ping', 1: 'Pong', 128: 'Query', 64: 'Push', 129: 'QueryHit'}

    ### PAYLOADENCODING Type: `str` Value:
        '<I'

    ### PAYLOADLENGTHLENGTH Type: `int` Value:
        4

    ### PAYLOADLENGTHOFFSET Type: `int` Value:
        19

    ### PINGPD Type: `int` Value:
        0

    ### PONGPAYLOADENCODING Type: `str` Value:
        '<HBBBBII'

    ### PONGPD Type: `int` Value:
        1

    ### PUSHPAYLOADENCODING Type: `str` Value:
        '<16sIBBBBH'

    ### PUSHPD Type: `int` Value:
        64

    ### QUERYHITPD Type: `int` Value:
        129

    ### QUERYPD Type: `int` Value:
        128

    ### reactor Type: `SelectReactor` Value:
        <twisted.internet.default.SelectReactor instance at 0x82e8c8c>

    ### SERVENTIDENTIFIERENCODING Type: `str` Value:
        '<16s'

    ### true Type: `int` Value:
        1

Generated by Epydoc 1.1 on Thu May 8 13:18:37 2003 | http://epydoc.sf.net