Connectable Observable

Rocket.connectableFunction
connectable(subject::J, source::S) where J where S

Creates a ConnectableObservable with a given subject object and a source observable.

Example

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

See also: ConnectableObservable, connect, subscribe!

source
Rocket.connectFunction
connect(connectable::ConnectableObservable)

When 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.

See also: connectable, ConnectableObservable

source
Rocket.ConnectableObservableType
ConnectableObservable{D}(subject, source)

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.

See also: connect, Subscribable

source