Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The current way of sending messages via `handle_cast`, `handle_info` callbacks doesn't allow the user to know whether the message was sent successfully or not. This is particularly important now that a connection might be in a backoff state for a long time. This adds a new callback, `handle_send_result` which gets called on success or error of processing a message to be sent. Note that this doesn't apply to `send_frame` since that is synchronous and already provides feedback. This isn't named `handle_reply_result` because I believe `:reply` should be renamed since it only makes sense in `handle_frame`, but not in `handle_cast` and `handle_info`. This also allows passing through a key to correlate a result with a send request.
- Loading branch information