feat: add onOperationComplete & onOperationError callbacks#2
Conversation
|
@NeedleInAJayStack This should allow for unsubscribe handling |
|
@NeedleInAJayStack Let me know if you think this looks like a more complete system. I added in an |
| var onOperationComplete: () -> Void = {} | ||
| var onOperationError: () -> Void = {} |
There was a problem hiding this comment.
It would be convenient for both of these to provide the ID of the operation that has completed or errored.
| return | ||
| } | ||
|
|
||
| // handle incoing message |
There was a problem hiding this comment.
Fix incoing to incoming
| import RxSwift | ||
|
|
||
| /// Server implements the server-side portion of the protocol, allowing a few callbacks for customization. | ||
| /// Server implements the server-side portion of the protocol, allowing a few callbacks for customization. 0 or 1 subscriptions per connection and no more. |
There was a problem hiding this comment.
Why do we specify 0 or 1 subscription? I believe it can support any number of subscriptions, as long as they have different IDs.
There was a problem hiding this comment.
This was just an incorrect assumption by me that I forgot to remove. Removed now.
NeedleInAJayStack
left a comment
There was a problem hiding this comment.
Looks great! Thanks @GNMoseke!
Chore: Pull base changes
Adds an onComplete callback & registration function for configuring behavior when the server receives a
completemessage