Package twisted :: Package protocols :: Module dns :: Class DNSDatagramProtocol

[show private | hide private]
[frames | no frames]

## Class DNSDatagramProtocol

    DatagramProtocol --+
                       |
                      DNSDatagramProtocol

Method Summary
| `__init__(self, controller)`
| `__getstate__(self)`
| `datagramReceived(self, data, addr)`
| ``doStart`(self)` Make sure startProtocol is called. (inherited from `DatagramProtocol`)
| ``doStop`(self)` Make sure stopProtocol is called. (inherited from `DatagramProtocol`)
| ``makeConnection`(self, transport)` Make a connection to a transport and a server. (inherited from `DatagramProtocol`)
| `pickID(self)`
`Deferred` | ``query`(self, address, queries, timeout, id)` Send out a message with the given queries.
| ``startProtocol`(self)` Called when a transport is connected to this protocol. (inherited from `DatagramProtocol`)
| ``stopProtocol`(self)` Called when the transport is disconnected.
| `writeMessage(self, message, address)`
| `_clearFailed(self, deferred, id)`

Class Variable Summary
`NoneType` | `id`
`NoneType` | `liveMessages`
`int` | `reissue`
`NoneType` | `resends`
`int` | `timeout`

Method Details

### query(self, address, queries, timeout=10, id=None)

Send out a message with the given queries.

  Parameters:
    `address` - The address to which to send the query
    (type=`tuple` of `str` and `int`)
    `queries` - The queries to transmit
    (type=`list` of `Query` instances)
  Returns:
    `Deferred`

### stopProtocol(self)

Called when the transport is disconnected.

Will only be called once, after all ports are disconnected.

  Overrides:
    `twisted.internet.protocol.DatagramProtocol.stopProtocol` (inherited documentation)

Class Variable Details

### id

  Type:
    `NoneType`
  Value:

        None

### liveMessages

  Type:
    `NoneType`
  Value:

        None

### reissue

  Type:
    `int`
  Value:

        2

### resends

  Type:
    `NoneType`
  Value:

        None

### timeout

  Type:
    `int`
  Value:

        10

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