I decided to use external states in the Miranda system. Because Miranda is a multi-threaded system this is what I call a Big Deal.
What this means, in practical terms, is that each thread reacts differently depending on what state it's in. For example, when a node is waiting for a "join" message, it reacts differently to a "join" message then when it is trying to connect.
What this boils down to is that, most of the behavior logic goes in the state classes and what I normally think of as the class itself does very little.
Time will tell if this was a good move or A Very Bad Idea.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment