* @brief Register a handler for receiving generic messages sent from another client. * The content of the messages are up to the client and really aren't related to Soar, but providing the * ability to send a message from any client to any other client is sometimes useful. * * When the original client sends a message, the RHS function handler is called to process and (optional
| 2206 | * @returns Unique ID for this callback. Required when unregistering this callback. |
| 2207 | *************************************************************/ |
| 2208 | int Kernel::RegisterForClientMessageEvent(char const* pClientName, ClientMessageHandler handler, void* pUserData, bool addToBack) |
| 2209 | { |
| 2210 | smlRhsEventId id = smlEVENT_CLIENT_MESSAGE ; |
| 2211 | |
| 2212 | // We actually use the RHS function code internally to process this message (since it's almost exactly like calling a RHS function that's |
| 2213 | // processed on a client). |
| 2214 | return InternalAddRhsFunction(id, pClientName, static_cast<RhsEventHandler>(handler), pUserData, addToBack) ; |
| 2215 | } |
| 2216 | |
| 2217 | /************************************************************* |
| 2218 | * @brief Unregister for a particular client message |
no outgoing calls