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.

PC_evn_subscribe_with_exp(proxy,
"subject",PC_NULL,
callback function,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 callback function, notify, to create a subscription for the subject Sample.Intro1.

PC_evn_subscribe_with_exp(p,
"Sample.Intro1",PC_NULL,
notify,PC_NULL,
PC_NULL, &hSubscription);