Skip to content

Client unable to reply to server push messages #70

@kerrd89

Description

@kerrd89

I am happy to help extend/fix this problem if someone can point me in the right direction.

Perhaps I misunderstand the implementation, but I am bumping into a problem attempting to reply in the client to a message from the server.

The server can respond to push messages which come into the handle_reply method in the client. But the client cannot respond to push messages from the server. The messages come into the handle_message method for the client, which does not have the from input. The documentation for the client reply is asking for a from GenServer input which doesn't exist on handle_message.

Attempts to reply with anything else than {:ok, state} or {:connect, state} returns an error from the handle_message in the client and the responses do not make it to the server.

I am attempting to use this for realtime messaging. Sending a request to a client to update configuration and wanting to a receive a reply to that message. The work around currently is publishing a different message #{original_message}_reply but this feels like it isn't using the built-in benefits of the socket.

Any advice? Known shortcomings? Pointers for how one would make this work? Suggestions for improving this project?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions