Skip to content

Instantly share code, notes, and snippets.

@adurpas
Created December 10, 2012 14:28
Show Gist options
  • Save adurpas/4250856 to your computer and use it in GitHub Desktop.
Save adurpas/4250856 to your computer and use it in GitHub Desktop.
#include <SubscriberId.hpp>
namespace details
{
SubscriberId::SubscriberId(osapi::MsgQueue* mq, unsigned long id)
{
/* Make your own implementation here... */
// New code starts
mq_ = mq;
id_ = id;
// New code ends
}
/** Send the message to the subscriber
*/
void SubscriberId::send(osapi::Message* m) const
{
/* What do you do when you want to send to a receiver?
What do you need to know? */
// New code starts
mq_->send(id_, m);
// New code ends
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment