I would recommend getting the Whiteboard edition of TogetherJ and run it on the netrek package. It can give a nice overview of the whole packages.
The netrek package contains four sub-packages
At this stage, the server listens for connections. Once the server gets one, it creates a proxy for the connecting client and hands it to the server driver, who in turns adds it to itself and the server side simulation controller. After the next tick has been run, the sim controller goes through all new clients, and for each new client, it traverses all valid objects in the simulation and asks for their init events. All the init events are added to the proxy.
Finally, the proxy is added to the client list and will thus get any further events added to the simulation.
At the next flushOutput(), the client will start to recieve the events. Normally, the number of events will trigger a mode-change to bulk mode transfer to efficiently move all the events over to the client.
The client will first attempt to find the personal configuration files, using the "user.home" property for the directory and "./nttng_config" as the filename. (hmm... need to change this - too platform dependent...). This file is loaded by the ConfigManager, which handles all kinds of configuration information (this isn't properly implemented yet, needs a lot more work).
The user interface is abstracted through the NetrekUI interface in order to allow both GUI's and non-Graphical UI's, typically for robots. If any -scripted_ui filename.py argument was given, then a PythonUI class is created and no GUI is used. This is used to start simple robots used for testing - some UNIX start scripts for this are availabel in the nttng/scripts directory, as is a dumb_bots.py script.
Assuming that no scripted_ui argument was given, the client creates a NetrekGUI object to handle the ui.
With the ui handled, the client creates a ServerProxy to get information from. There are two kinds of proxies possible here. The ReplayProxy is used for replay (and debugging) purposes. It is used if a -replay eventlog argument is given.
If that wasnt't the case, then a CsgcServerLinkProxy is created.
Finally, a NetrekClientDriver is created and started.
It adds itself as a SimTransitionListener on the simulation engine and waits until the NetrekServerInfo object becomes valid. Once that happens, it does some initializations and then calls the doAuth() method in the ui to start authentificating the player. Further actions are up to the user interface.
Control is then passed to the PlayerDB.