I'm currently using an observable in the following way:
this._socket.onMessage.subscribe(
(message) => {
}
);
which works fine! However, Would it be possible to pass a variable to the observable that would allow for some logic?
For example by passing a variable "name" to onMessage, I could subscribe only to events whos name is something specific? Like this:
this._socket.onMessage(name-variable).subscribe(
(message) => {
// only get events that is related to the name-variable
}
);