2021-03-11 16:14:34 +01:00
|
|
|
import {Subject} from "rxjs";
|
|
|
|
|
|
|
|
class WorldFullMessageStream {
|
|
|
|
|
2021-04-29 23:47:30 +02:00
|
|
|
private _stream:Subject<string|null> = new Subject<string|null>();
|
2021-03-11 16:14:34 +01:00
|
|
|
public stream = this._stream.asObservable();
|
|
|
|
|
|
|
|
|
2021-04-29 23:47:30 +02:00
|
|
|
onMessage(message? :string) {
|
|
|
|
this._stream.next(message);
|
2021-03-11 16:14:34 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export const worldFullMessageStream = new WorldFullMessageStream();
|