Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IO Service - What is ME:RT:1://event ? #626

Open
2 of 6 tasks
imike57 opened this issue Oct 8, 2018 · 0 comments
Open
2 of 6 tasks

IO Service - What is ME:RT:1://event ? #626

imike57 opened this issue Oct 8, 2018 · 0 comments

Comments

@imike57
Copy link

imike57 commented Oct 8, 2018

What type of issue are you creating?

  • Bug
  • Enhancement
  • Question

What version of this module are you using?

  • 2.0.10 (Stable)
  • 2.1.0-rc.n (2.1 Release Candidate n)
  • Other

Write other if any:

Please add a description for your issue:

Hi,

I try to use Realtime interface which use IO Service... in which we have 2 functions

  emit(event: string, data: any): void {
    this.socket.emit('ME:RT:1://event', {
        event : event,
        data  : data
    });
  }

  on(event: string): Observable<any> {
    if (this.observables[event]) { return this.observables[event]; }
    let subject: Subject<any> = new Subject<any>();
    this.socket.on(event, (res: any) => subject.next(res));
    this.observables[event] = subject.asObservable();
    return this.observables[event];
  }

for "on", ok . I can got emit from the server, but to emit to the server it's not working like IO Socket usually work this.socket.emit('event', 'data')...
If I change this function to

  emit(event: string, data: any): void {
    this.socket.emit(event, data);
  }

it will work again... But each time I will regenerate the SDK, it will be back.. I would like understand this function. Why it not work like usually emit ? What is "'ME:RT:1://event'," ?

Thank's

Mike

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant