Package twisted :: Package internet :: Module udp :: Class ConnectedPort |
[frames | no frames]

## Class ConnectedPort

     Ephemeral --+
                 |
        Logger --+
                 |
    FileDescriptor --+
                     |
              BasePort --+
                         |
                      Port --+
                             |
                            ConnectedPort

Known Subclasses:
  `ConnectedMulticastPort`

A connected UDP socket.

Method Summary
| `__init__(self, (remotehost, remoteport), port, proto, interface, maxPacketSize, reactor)`
| `connectionFailed(self, reason)`
| ``doRead`(self)` Called when my socket is ready for reading.
| ``getPeer`(self)` Returns a tuple of ('INET_UDP', hostname, port), indicating the remote address.
| `setRealAddress(self, addr)`
| ``startListening`(self)` Create and bind my socket, and begin listening on it.
| ``write`(self, data)` Write a datagram.
Inherited from Port
| ``__repr__`(self)`
| ``_bindSocket`(self)`
| ``_connectToProtocol`(self)`
| ``connectionLost`(self, reason)` Cleans up my socket.
| ``getHost`(self)` Returns a tuple of ('INET_UDP', hostname, port), indicating the servers address
| ``logPrefix`(self)` Returns the name of my class, to prefix log entries with.
| ``loseConnection`(self)` Stop accepting connections on this port.
| ``setLogStr`(self)`
| ``stopListening`(self)` Stop accepting connections on this port.
| ``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.I...`
Inherited from Port
`int` | `addressFamily` = 2
`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`

### getPeer(self) Returns a tuple of ('INET_UDP', hostname, port), indicating the remote address.

### 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.udp.Port.write`

Class Variable Details

    ### __implements__ Type: `tuple` Value:
        (((<class twisted.internet.interfaces.IProducer at 0x8268d14>,
           <class twisted.internet.interfaces.IReadWriteDescriptor at 0x825a2d\
        c>,
           <class twisted.internet.interfaces.IConsumer at 0x825a32c>,
           <class twisted.internet.interfaces.ITransport at 0x823d844>),
          <class twisted.internet.interfaces.IUDPTransport at 0x828381c>),
         <class twisted.internet.interfaces.IUDPConnectedTransport at 0x8251dc\
        c>)

Generated by Epydoc 2.0 on Sat Oct 25 00:54:50 2003 | http://epydoc.sf.net