-
Notifications
You must be signed in to change notification settings - Fork 265
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
Add notifications through websockets #2004
Merged
kzangeli
merged 13 commits into
telefonicaid:feature/1181_websockets
from
fortizc:ws_notify
Apr 7, 2016
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7f33456
Fix include in ConnectionInfo
fortizc 71cd206
Add a little class to set constants for Orion WS
fortizc b602536
Modify ws.cpp to use constants in constants.h
fortizc 7422ecd
Remove connection_manager
fortizc d26e337
Add more headers in the response
fortizc 5932dc2
Add support for notifications through websockets
fortizc ea76cbb
Use constants.h
fortizc 629fd7d
Remove subscription when connection is closed
fortizc 05fb052
Add loop to ensure lws_write write all data
fortizc 661796d
Add constants for subId length
fortizc ec02762
Add comments for sendNotifyContextRequestWs
fortizc c824a6c
Change protocol name
fortizc 51652e9
Fix bytes count in wsNotify
fortizc 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 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 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 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 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 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 was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* | ||
* Copyright 2016 Telefonica Investigacion y Desarrollo, S.A.U | ||
* | ||
* This file is part of Orion Context Broker. | ||
* | ||
* Orion Context Broker is free software: you can redistribute it and/or | ||
* modify it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* Orion Context Broker is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Orion Context Broker. If not, see http://www.gnu.org/licenses/. | ||
* | ||
* For those usages not covered by this license please contact with | ||
* iot_support at tid dot es | ||
* | ||
* Author: Felipe Ortiz | ||
*/ | ||
|
||
|
||
#include "constants.h" | ||
|
||
const int WSConstants::Port = 9010; | ||
const int WSConstants::Pooling = 50; | ||
const size_t WSConstants::DataSize = 128; | ||
// Ok, this is can be a macro, but I prefer | ||
// to be consistent | ||
const std::string WSConstants::ProtocolName = "ngsiv2-json"; | ||
const std::string WSConstants::Scheme = "ws://"; |
This file contains 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 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 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.
At the end, did we make this configurable by CLI? Or that is part of another issue (not yet addressed)?
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.
MMmm.. maybe we must create a new issue for that
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.
Actually, it seems we have it. This is: #1671