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

## Class ConnectedPort

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

Known Subclasses:
  `ConnectedMulticastPort`

A connected UDP socket.

Method Summary
| `__init__(self, (remotehost, remoteport), port, proto, interface, maxPacketSize, reactor)`
| `__getstate__(self)` (inherited from `Ephemeral`)
| `__repr__(self)` (inherited from `Port`)
| `__setstate__(self, state)` (inherited from `Ephemeral`)
| `connectionFailed(self, reason)`
| ``connectionLost`(self, reason)` Cleans up my socket. (inherited from `Port`)
| ``doRead`(self)` Called when my socket is ready for reading.
| ``fileno`(self)` File Descriptor number for select(). (inherited from `FileDescriptor`)
| ``getHost`(self)` Returns a tuple of ('INET_UDP', hostname, port), indicating the servers address (inherited from `Port`)
| ``getPeer`(self)` Returns a tuple of ('INET_UDP', hostname, port), indicating the remote address.
| ``logPrefix`(self)` Returns the name of my class, to prefix log entries with. (inherited from `Port`)
| ``loseConnection`(self)` Stop accepting connections on this port. (inherited from `Port`)
| `pauseProducing(self)` (inherited from `FileDescriptor`)
| ``registerProducer`(self, producer, streaming)` Register to receive data from a producer. (inherited from `FileDescriptor`)
| `resumeProducing(self)` (inherited from `FileDescriptor`)
| `setLogStr(self)` (inherited from `Port`)
| `setRealAddress(self, addr)`
| ``startListening`(self)` Create and bind my socket, and begin listening on it.
| ``startReading`(self)` Start waiting for read availability. (inherited from `FileDescriptor`)
| ``startWriting`(self)` Start waiting for write availability. (inherited from `FileDescriptor`)
| ``stopConsuming`(self)` Stop consuming data. (inherited from `FileDescriptor`)
| ``stopListening`(self)` Stop accepting connections on this port. (inherited from `Port`)
| `stopProducing(self)` (inherited from `FileDescriptor`)
| ``stopReading`(self)` Stop waiting for read availability. (inherited from `FileDescriptor`)
| ``stopWriting`(self)` Stop waiting for write availability. (inherited from `FileDescriptor`)
| ``unregisterProducer`(self)` Stop consuming data from a producer, without disconnecting. (inherited from `FileDescriptor`)
| ``write`(self, data)` Write a datagram.
| `writeSequence(self, seq, addr)` (inherited from `Port`)
| ``writeSomeData`(self, data)` Write as much as possible of the given data, immediately. (inherited from `FileDescriptor`)

Class Variable Summary
`tuple` | `__implements__`

Method Details

### doRead(self) Called when my socket is ready for reading.

### 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.

Class Variable Details

    ### __implements__ Type: `tuple` Value:
        (((<class 'twisted.internet.interfaces.IProducer'>,
           <class 'twisted.internet.interfaces.IReadWriteDescriptor'>,
           <class 'twisted.internet.interfaces.IConsumer'>,
           <class 'twisted.internet.interfaces.ITransport'>),
          <class 'twisted.internet.interfaces.IUDPTransport'>),
         <class 'twisted.internet.interfaces.IUDPConnectedTransport'>)

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