Package lacewing :: Module client :: Class ClientDatagram
[frames] | no frames]

Class ClientDatagram

source code

twisted.internet.protocol.AbstractDatagramProtocol --+    
                                                     |    
            twisted.internet.protocol.DatagramProtocol --+
                                                         |
                                                        ClientDatagram

Instance Methods
 
__init__(self, connection) source code
 
startProtocol(self)
Called when a transport is connected to this protocol.
source code
 
datagramReceived(self, data, (host, port))
Called when a datagram is received.
source code
 
sendLoader(self, loader) source code

Inherited from twisted.internet.protocol.DatagramProtocol: connectionRefused

Inherited from twisted.internet.protocol.AbstractDatagramProtocol: __getstate__, doStart, doStop, makeConnection, stopProtocol

Class Variables
  connection = None
hash(x)
  host = None
hash(x)
  port = None
hash(x)

Inherited from twisted.internet.protocol.AbstractDatagramProtocol: noisy, numPorts

Instance Variables

Inherited from twisted.internet.protocol.DatagramProtocol: transport

Method Details

__init__(self, connection)
(Constructor)

source code 
Parameters:
  • connection - The ClientProtocol instance this datagram should use

startProtocol(self)

source code 

Called when a transport is connected to this protocol.

Will only be called once, even if multiple ports are connected.

Overrides: twisted.internet.protocol.AbstractDatagramProtocol.startProtocol
(inherited documentation)

datagramReceived(self, data, (host, port))

source code 

Called when a datagram is received.

Parameters:
  • datagram - the string received from the transport.
  • addr - tuple of source of datagram.
Overrides: twisted.internet.protocol.AbstractDatagramProtocol.datagramReceived
(inherited documentation)