-
Notifications
You must be signed in to change notification settings - Fork 21
Notification support #18
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
Merged
stevenh
merged 32 commits into
Unity-Technologies:master
from
irgendwr:notification-support
Feb 6, 2019
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
c627eab
changed scanning to filter notify messages
irgendwr 42ea2ef
readded multiline support
irgendwr eb958eb
added support for notifications
irgendwr 48b585f
fixed issues and suggestions
irgendwr a2b28f7
clarify DecodeResponse error assertions
irgendwr 6c55d63
added notification buffer and removed debug print
irgendwr 8a8634b
fixed data race
irgendwr adcd4eb
added keepalive option
irgendwr 778110a
only set connected to false if it's true (might fix data-race?)
irgendwr 3a92186
added mutex
irgendwr 7032b17
updated keepalive for the v3.3+ server releases
irgendwr 6c6af09
improved timeout
irgendwr 54ee219
added option to set the notification buffer size
irgendwr 91a7399
made notification write non-blocking
irgendwr 79a6b09
handle connection status threadsafe
irgendwr f2b1722
renamed register methods
irgendwr 4b93b4d
exported NotifyEvent type and fixed typo
irgendwr 97c0f92
removed redundant if
irgendwr d5157f0
renamed NotifyEvent to NotifyCategory
irgendwr 6ea7e0f
fixed NotifyCategory comment
irgendwr 56617d2
added mutex to Keepalive
irgendwr 39ffab3
added option to set a custom Keepalive interval
irgendwr e7bb356
avoid recreating notify channel
irgendwr f6e7cb5
cleaned up NotificationBuffer option
irgendwr af6af24
restructured keepalive and command handling
irgendwr b5074a9
use fmt.Stringer
irgendwr b217030
change work type to string
irgendwr 4b22361
removed mutex and improved timeout
irgendwr 665a438
added tests
irgendwr c56fcd0
reduced timeout in tests to improve speed
irgendwr bbd7801
clarified comment, inlined if
irgendwr 22afe59
reverted to previous timeout
irgendwr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about time errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean. Timeout errors? Any errors are returned with
c.err <- err
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but as you're always reading, in order to facilitate notifications, and every read should have a timeout (not just the ones triggered by writes) then you need to deal with the expected timeouts otherwise the client would get a constant stream of errors even when they didn't send any commands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why should the read in the message handler have a timeout? This would just lead to constant timeout errors and serve no purpose imho.
Otherwise I could set a deadline and and just ignore all of the errors caused by timeouts.