Twisted and connected UDP example

Joakim Bech jyx at telia.com
Wed Sep 15 15:18:11 CEST 2004


At this page
-->  http://twistedmatrix.com/documents/current/howto/udp
is an example that shows how connected UDP is done
with Twisted. I can't get it to work.
When I run it, it says:

...
     self.startProtocol()
   File "./client2.py", line 10, in startProtocol
     d.addCallback(self._cbConnected)
AttributeError: 'NoneType' object has no attribute 'addCallback'
...

I.e it looks like the
"d = self.transport.connect("ip_to_listening_server", listen_port_nbr)"
doesn't return anything?

As server at "the other side" I've used the first example
and I have also tried using netcat as an listening UDP-server.
I'm sure that the IP-adress and port is correct in my code,
so it can't be that.

(Btw, the self.transport.write .. line is not correct indented
I suppose?)

Anyone that can help me with this?



More information about the Python-list mailing list