PreCache NetInjector Documentation Center : PreCache NetInjector Application Development

Basic Case, Subscription — C++

   







Subscription

— the relationship between publisher and subscriber


The proxy must create a subscription requesting the content published for the subject in our channel.

proxy.Subscribe("subject", new subscriber object, closure);

For our subscriber, we would like to access the Sample subject created in Basic Case, Publication — C++. After initializing a Proxy object p, we invoke our instance of MySubscriber to create a subscription for the subject Sample.Intro1.

p.Subscribe("Sample.Intro1", new MySubscriber(), NULL);