Package nattraverso :: Module ipdiscover :: Class LocalNetworkMulticast
[show private | hide private]
[frames | no frames]

Type LocalNetworkMulticast

AbstractDatagramProtocol --+    
                           |    
            DatagramProtocol --+
                               |
                      object --+
                               |
                              LocalNetworkMulticast


Local IP discovery protocol via multicast:
Method Summary
  __init__(self, *args, **kwargs)
  datagramReceived(self, dgram, addr)
Datagram received, we callback the IP address.
twisted.internet.defer.Deferred discover(self)
Launch the discovery of an UPnP device on the local network.
    Inherited from DatagramProtocol
  connectionRefused(self)
Called due to error from write in connected mode.
    Inherited from AbstractDatagramProtocol
  __getstate__(self)
  doStart(self)
Make sure startProtocol is called.
  doStop(self)
Make sure stopProtocol is called.
  makeConnection(self, transport)
Make a connection to a transport and a server.
  startProtocol(self)
Called when a transport is connected to this protocol.
  stopProtocol(self)
Called when the transport is disconnected.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
    Inherited from AbstractDatagramProtocol
bool noisy = True
int numPorts = 0                                                                     
NoneType transport = None                                                                  

Method Details

datagramReceived(self, dgram, addr)

Datagram received, we callback the IP address.
Overrides:
twisted.internet.protocol.AbstractDatagramProtocol.datagramReceived

discover(self)

Launch the discovery of an UPnP device on the local network. You should always call this after having created the object.
>>> result = LocalNetworkMulticast().discover().addCallback(got_upnpdevice_ip)
Returns:
A deferred called with the IP address of the UPnP device
           (type=twisted.internet.defer.Deferred)

Generated by Epydoc 2.1 on Tue Aug 30 14:56:47 2005 http://epydoc.sf.net