networking problem

Hey guys!
I looked in the manual at the chapter 29: Networking. I wanted to test what i undestand and write these two programs (both in the attached zip). The problem is: If i start the server and then start the client the client should connect to the server and send a Datagram containing the String “Frage” (german for “question”) the server should print it and send back a Datagram containing the string “Antwort” (which is german for “answer”). What happens is: The client sends data all the time. But the server doesn’t even catch the connection so the data is all send to nowhere.
I hope someone can help me there.
regards
Ich und nicht du
examples.zip (3.3 KB)

You forget to add connection to the listener self.listener.addConnection(tcpSocket)

May be it’s offtopic, but for the fast prototyping of game network I can suggest PodSixNet python library. Panda’s builtin networking is quite complicated imho

Thanks! Finally it works! Now is just the question why on should use the panda3d network module if you can just use the python builtin socket module…