ios - ReactiveCocoa: why subscriber has "sendNext" method rather "receiveNext" method -


i'm learning reactivecocoa , understand racsignal must subscribed racsubscriber signal send event. clear racsignal send event racsubscriber , racsubscriber receive event racsignal. however, when customize own racsignal following code:

racsignal *racsignal = [racsignal createsignal:^racdisposable* (id<racsubscriber> subscriber) {     //why subsriber "sendnext" not "receivenext"?     [subscriber sendnext:@100];     return nil; }]; 

the racsubscriber protocol has sendnext method confuses me because method name of receivenext should more appropriate understanding. can body me clarify that?

technically, object implementing racsubscriber protocol doesn't consume events, forwards them subscribers. in case there one, great thing racsignal can observed different objects , threads.

so right naming of racsubscriber might bit misleading, wouldn't put attention on that, documentation say:

you shouldn't need implement protocol. +[racsignal createsignal:], racsignal's subscription methods, or racsubject should work uses.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -