connectable(subject::J, source::S) where J where S
ConnectableObservable with a given subject object and a source observable.
using Rocket c = connectable(Subject(Int; scheduler = AsapScheduler()), from(1:3)) subscribe!(c, logger()); connect(c); ; # output [LogActor] Data: 1 [LogActor] Data: 2 [LogActor] Data: 3 [LogActor] Completed
connect is called, the subject passed to the multicast operator is subscribed to the source and the subject’s observers receive the multicast notifications, which fits our basic mental model of stream multicasting. Returns a subscription.
A connectable observable encapsulates the multicasting infrastructure with provided subject, but does not immediately subscribe to the source. It subscribes to the source when its
connect method is called.