|
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 message virtual functions. If the parse fails, it will throw a CHMerror exception object. The following code shows an example of how this API can be invoked:
This is a call sequence:
The following code fragment gives an idea of what a typical message virtual method would look like when the user overrides the ServerEngine class:
Example engine message virtual function Overriding the ParseMessage MethodThere are many times where 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 |