Package lacewing :: Module server :: Class ServerDatagram
[frames] | no frames]

Class ServerDatagram

source code

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

Instance Methods
 
__init__(self, factory) source code
 
datagramReceived(self, data, (host, port))
Called when a datagram is received.
source code
 
sendLoader(self, connection, loader) source code

Inherited from twisted.internet.protocol.DatagramProtocol: connectionRefused

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

Class Variables

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

Instance Variables

Inherited from twisted.internet.protocol.DatagramProtocol: transport

Method Details

__init__(self, factory)
(Constructor)

source code 
Parameters:
  • factory - The master TCP factory of the server.

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)