Package twisted :: Package internet :: Module unix :: Class ConnectedDatagramPort

[frames | no frames]

## Class ConnectedDatagramPort

     Ephemeral --+
                 |
        Logger --+
                 |
    FileDescriptor --+
                     |
              BasePort --+
                         |
                      Port --+
                             |
                  DatagramPort --+
                                 |
                                ConnectedDatagramPort

A connected datagram UNIX socket.

Method Summary
| `__init__(self, addr, proto, maxPacketSize, mode, bindAddress, reactor)`
| `connectionFailed(self, reason)`
| ``doRead`(self)` Called when my socket is ready for reading.
| `getPeer(self)`
| ``startListening`(self)` Create and bind my socket, and begin listening on it.
| ``write`(self, data)` Write a datagram.
Inherited from DatagramPort
| ``_bindSocket`(self)`
| ``connectionLost`(self, reason)` Cleans up my socket.
| ``getHost`(self)` Returns an IPv4Address.
| ``setLogStr`(self)`
Inherited from Port
| ``__repr__`(self)`
| ``_connectToProtocol`(self)`
| ``connect`(self, host, port)` 'Connect' to remote server.
| ``getHandle`(self)` Return a socket object.
| ``logPrefix`(self)` Returns the name of my class, to prefix log entries with.
| ``loseConnection`(self)` Stop accepting connections on this port.
| ``stopListening`(self)`
| ``writeSequence`(self, seq, addr)`
Inherited from BasePort
| ``createInternetSocket`(self)`
| ``doWrite`(self)` Raises a RuntimeError
Inherited from FileDescriptor
| ``_postLoseConnection`(self)` Called after a loseConnection(), when all data has been written.
| ``fileno`(self)` File Descriptor number for select().
| ``pauseProducing`(self)`
| ``registerProducer`(self, producer, streaming)` Register to receive data from a producer.
| ``resumeProducing`(self)`
| ``startReading`(self)` Start waiting for read availability.
| ``startWriting`(self)` Start waiting for write availability.
| ``stopConsuming`(self)` Stop consuming data.
| ``stopProducing`(self)`
| ``stopReading`(self)` Stop waiting for read availability.
| ``stopWriting`(self)` Stop waiting for write availability.
| ``unregisterProducer`(self)` Stop consuming data from a producer, without disconnecting.
| ``writeSomeData`(self, data)` Write as much as possible of the given data, immediately.
Inherited from Ephemeral
| ``__getstate__`(self)`
| ``__setstate__`(self, state)`

Class Variable Summary
`tuple` | `__implements__` = `((<class twisted.internet.interfaces.IP...`
Inherited from DatagramPort
`int` | `addressFamily` = 1
Inherited from Port
`int` | `maxThroughput` = 262144
`int` | `socketType` = 2
Inherited from FileDescriptor
`int` | `bufferSize` = 65536
`int` | `connected` = 0
`str` | `dataBuffer` = `''`
`int` | `disconnected` = 0
`int` | `disconnecting` = 0
`int` | `offset` = 0
`NoneType` | `producer` = None
`int` | `producerPaused` = 0
`int` | `streamingProducer` = 0

Method Details

### doRead(self)

Called when my socket is ready for reading.

  Overrides:
    `twisted.internet.udp.Port.doRead`

### startListening(self)

Create and bind my socket, and begin listening on it.

This is called on unserialization, and must be called after creating a server to begin listening on the specified port.

  Overrides:
    `twisted.internet.udp.Port.startListening` (inherited documentation)

### write(self, data)

Write a datagram.

  Overrides:
    `twisted.internet.unix.DatagramPort.write`

Class Variable Details

### __implements__

  Type:
    `tuple`
  Value:

        ((<class twisted.internet.interfaces.IProducer at 0x827b064>,
          <class twisted.internet.interfaces.IReadWriteDescriptor at 0x827d20c\
        >,
          <class twisted.internet.interfaces.IConsumer at 0x824feb4>,
          <class twisted.internet.interfaces.ITransport at 0x8254024>),
         <class twisted.internet.interfaces.IUNIXDatagramConnectedTransport at\
         0x8252334>)

Generated by Epydoc 2.0 on Sat May 15 20:08:14 2004 | http://epydoc.sf.net