Hello all,
I have been working on a proposal for the messaging system refactoring that takes into consideration some of the things that Tao has suggested and would like to see.
the branch is at:
pyogp/pyogp.lib.base/brances/locklainn-message-refactoring

For examples of how this is used, go into one of the test_udp* files in the client test folder.

Mainly, the changes include direct access to the messages so that you directly build the messages instead of going through a builder or reader. In essence, the builders and readers no longer store the messages in their "state".

Also, the method by which packets are serialized and deserialized is more in the form of ZCA and is a much better design than before.

The Message System has been renamed to UDPConnection, which suggests that it no longer serves the purposes it did before (handles the connection between both llsd tcp and template udp messages). It serves only for udp connections, manages many different circuits, handles all acking, and resending unacked.

Here is an example of use:
      msg = Message('PacketAck',
                    Block('Packets', ID=0x00000003, ID=0x00000002)
                    )
      packet = IPacket(msg)
      buf = self.udpconnection.send_message(packet, self.host)


Some things to consider:
Tao and I were talking about the sockets. There are two options we see:
1) each udp connection has its own socket
this means that the udp socket is connected directly to its remote address and doesn't receive any data from anything else, or send data to anywhere else. This could have problems if there are too many sockets created in situations like, large draw distances and so connections with many sims, many agents (and so sockets are multiplied) or something of the sort 2) there is a 1 level-higher than the circuit object that has a single socket which dispatches to the circuit. This is how the message system currently works. The benefit is a single socket. The disadvantage is having the higher level object that we need to use.



_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/pyogp

Reply via email to