High-level networking.

As has been pointed out, the distributed object model is barely documented and if you are looking for a bunch of helpful examples, you will be sorely disappointed.

That being said, I use the distributed system, it works and in some ways it is better than writing your own network protocols by hand. It really depends on what you want to do, but if you want to use the distributed system, you should expect to get your hands dirty in the source because (a) there are no docs, (b) there are bugs lurking in there.

There was an old version of Panda that shipped with a chat room sample program, I think it was Panda 1.05. The sample has long since disappeared from the distribution but if you grab 1.05 it is at least a place to start. I seem to recall that the example does not work on the latest versions of Panda, but I also recall it being pretty trivial to fix. I can dig it out and have a look if you can’t figure it out.

Anyways, the classes you are going to want to investigate to brgin with are ServerRepository, ClientRepository and DistributedObject. The idea is that the ServerRepository runs on the server and keeps track of all the distributed objects living among your clients, and works as a proxy to move packets between the ClientRepository classes, which will live on all of your clients (and probably an instance on the server, too). DistributedObjects (or objects derived from DistributedObject, such as DistributedNode, DistributedActor, or your own classes) are instantiated through your ClientRepository (createWithRequired method), are pushed up to the ServerRepository, and then are pushed out to all the other ClientRepository. The DistributedObjects use sendUpdate calls to push remote procedure calls or property updates up to the server repository and out to the other clients. Oh, and the last aspect you will need to understand is the .dc (distributed class) files which you must write along with each DistributedObject-derived class, which define what methods are exported over the network, and what sort of arguments they accept.

Of course this is all a fairly abstract explanation, I recommend you dig out Panda 1.05 as I mentioned and study the chat room example for a while. And as I said, you will almost inevitably have to get familiar with the Panda source, because this stuff just isn’t documented.

Oh, and by the way, you may also want to look at the source editing forums since I think I have posted some bug fixes to the engine itself in there. Some of them have been rolled into the CVS repository for Panda 1.4, some of them not.