Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Why send "deferred":{"promise":{}} to server #18

@yinhm

Description

@yinhm

I found ngSocket send "deferred":{"promise":{}} as part of json message when I was migrating from another websocket library. See: angular/ngSocket/blob/master/src/ngSocket.js#L136

I don't see the reason behind this, I have monkey patched it to:

          this.socket.send(typeof data.message === 'string'?
            data.message :
            JSON.stringify(data.message));

to make it compatible with my server code.

I think ngSocket should not make any assumption of server implementation. So my question is: can we let user define what it should send?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions