|
Parsing a MessageThe ParseMessage method of the application Engine should be invoked to parse a message. If it successfully recognizes and parses a message, it will invoke one of the OnMessage events. If not, it will throw a ChameleonException. The following code shows an example of how this API can be invoked:
This diagram gives the call sequence which is invoked assuming the user has chosen to name the application Engine class 'ServerEngine': ![]() Parsing Call Sequence
The following code fragment gives an idea of what a typical On<message name>Message virtual method would look like when the user performs an override in the ServerEngine class:
Example engine OnXYZMessage virtual function Overriding the ParseMessage MethodThere are many times that it's helpful to override the ParseMessage method in an application. Some good reasons are:
The following code fragment shows an example of how you might go about overriding the ParseMessage method in an application engine object:
Overriding ParseMessage |