Only have 1 socket (self.socket above is good)

Then do:
self.socket.bind("simulation's address:port")
self.socket.connect("NN's address:port")

Also remove the second context.