Group Group Group Group Group Group Group Group Group

Subscription and Subscriber

Hello, I am a beginner of Combine Framework. And I have a question to wanna get answer. Would you please tell me what the essential different between subscription and subscriber. I just only know they confirm different protocol.

Hi there @richmond_jam! I’m guessing you’re referring to publisher as subscription? From my understanding the publisher is used to provide data upon request while the subscriber will request and accept data so it can then be used.

Best,
Gina

Hi Gina,
In chapter 2, I studied source code and I found some variables named subscription confirm protocol AnyCancellable.At page 42 in your book, you say “The publisher creates a subscription and gives it to the subscriber.” So I wanna know what the essential different between subscription confirm protocol AnyCancellable and subscriber confirm protocol Subscriber.