Hello again,
After talking the redesign over a bit, there have been some changes made to the design.

The refactoring changes things as follows:

Circuits
It's responsibilities now include handling the ack upkeep, that is, determining if the packet needs acking, based on the flags set in the packet.

MessageSystem/UDPConnection now called UDPDispatcher
It's responsibilities include receiving a message from an EXTERNAL source, deserializing it, and having it handled by circuits and packet handlers. It simply receives the data, finds the circuit it came in over, and dispatches the packet to the circuit. This allows a single socket to be used (can group circuits together). It still handles the sending of messages as well. In any case, it seems like the design will need to use Tao's EndPoint, that is passed to the Dispatcher, and is passed to each circuit. I don't personally like this model of passing an endpoint around, but if that is how we want to do it then I'll code that up.
SO (note, this ISN'T how it is currently done):
endpoint = EndPoint()
circuit = Circuit(endpoint)
circuit.send(packet) - where the circuit's send function will delegate to the endpoint

dispatcher = UDPDispatcher(endpoint)
dispatcher.add_circuit(circuit)
endpoint.set_handler(dispatcher)
endpoint.receive() - where the endpoint's receive function will get data from teh socket and hand it off to the dispatcher

Message
There is no a Message class which wraps the old code so that we can use more Pythonic creation of Messages.

Serializer/Deserializer
These put the message data into or out of raw character strings to be sent over a network.

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

Reply via email to