Creating a Listener
All custom listeners derive from the class rwsf::MessageListenerImp.
To create a custom Listener:
1. As with transports, extend this class and implement at least these five pure virtual functions:
virtual void doInit(const rwsf::Config& initParams) = 0;
virtual void initServer() = 0;
virtual void doStart() = 0;
virtual void doStop() = 0;
virtual void doReset() = 0;
2. Implement a method for handling requests, and some kind of threading framework for the listener to run in.
3. Define the macro RWSF_DEFINE_MESSAGE_HANDLER(NAME) in the implementation file.
4. Configure the listener in the configuration file client-transports.xml.
Request Handling and Threading discusses code for handling incoming messages and creating the threading mechanism. For specifics on implementing the five virtual functions, see Implementing the Virtual Methods.