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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -