Repository: qpid-proton Updated Branches: refs/heads/master 9ede20887 -> f537eb897
PROTON-810: Changed package name from qpid-proton to qpid-proton-messenger as we are likely to want to add a qpid-proton-reactor at some point and it's better to get the names sorted now Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/f537eb89 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/f537eb89 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/f537eb89 Branch: refs/heads/master Commit: f537eb897d7e85cd38ffbc3eeaa126d953e44953 Parents: 9ede208 Author: Fraser Adams <[email protected]> Authored: Sat Jan 31 14:09:50 2015 +0000 Committer: Fraser Adams <[email protected]> Committed: Sat Jan 31 14:11:45 2015 +0000 ---------------------------------------------------------------------- examples/messenger/javascript/client.js | 2 +- examples/messenger/javascript/drain.js | 2 +- examples/messenger/javascript/qpid-config.js | 2 +- examples/messenger/javascript/recv.js | 2 +- examples/messenger/javascript/send.html | 2 +- examples/messenger/javascript/send.js | 2 +- examples/messenger/javascript/server.js | 2 +- examples/messenger/javascript/spout.js | 2 +- proton-c/bindings/javascript/CMakeLists.txt | 35 ++-- proton-c/bindings/javascript/README | 4 +- .../javascript/qpid-proton-messenger/LICENSE | 203 +++++++++++++++++++ .../javascript/qpid-proton-messenger/README.md | 94 +++++++++ .../qpid-proton-messenger/lib/.gitignore | 21 ++ .../qpid-proton-messenger/package.json | 15 ++ .../bindings/javascript/qpid-proton/LICENSE | 203 ------------------- .../bindings/javascript/qpid-proton/README.md | 4 - .../javascript/qpid-proton/lib/.gitignore | 21 -- .../javascript/qpid-proton/package.json | 11 - tests/javascript/codec.js | 2 +- tests/javascript/message.js | 2 +- tests/javascript/msgr-recv.js | 2 +- tests/javascript/msgr-send-common.js | 4 +- tests/javascript/msgr-send.html | 2 +- tests/javascript/msgr-send.js | 2 +- tests/javascript/soak.js | 2 +- 25 files changed, 369 insertions(+), 274 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/examples/messenger/javascript/client.js ---------------------------------------------------------------------- diff --git a/examples/messenger/javascript/client.js b/examples/messenger/javascript/client.js index a3890b6..d128503 100755 --- a/examples/messenger/javascript/client.js +++ b/examples/messenger/javascript/client.js @@ -23,7 +23,7 @@ // Check if the environment is Node.js and if not log an error and exit. if (typeof process === 'object' && typeof require === 'function') { - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); var address = "amqp://0.0.0.0"; var subject = "UK.WEATHER"; http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/examples/messenger/javascript/drain.js ---------------------------------------------------------------------- diff --git a/examples/messenger/javascript/drain.js b/examples/messenger/javascript/drain.js index 04ced73..1df6fd4 100755 --- a/examples/messenger/javascript/drain.js +++ b/examples/messenger/javascript/drain.js @@ -21,7 +21,7 @@ // Check if the environment is Node.js and if not log an error and exit. if (typeof process === 'object' && typeof require === 'function') { - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); console.log("drain not implemented yet"); process.exit(0); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/examples/messenger/javascript/qpid-config.js ---------------------------------------------------------------------- diff --git a/examples/messenger/javascript/qpid-config.js b/examples/messenger/javascript/qpid-config.js index 2f2a2ee..cf7201b 100755 --- a/examples/messenger/javascript/qpid-config.js +++ b/examples/messenger/javascript/qpid-config.js @@ -41,7 +41,7 @@ if (typeof process === 'object' && typeof require === 'function') { var qmf = {}; // Create qmf namespace object. qmf.Console = function() { // qmf.Console Constructor. - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); var message = new proton.Message(); var messenger = new proton.Messenger(); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/examples/messenger/javascript/recv.js ---------------------------------------------------------------------- diff --git a/examples/messenger/javascript/recv.js b/examples/messenger/javascript/recv.js index ab5fcf1..79afb20 100755 --- a/examples/messenger/javascript/recv.js +++ b/examples/messenger/javascript/recv.js @@ -21,7 +21,7 @@ // Check if the environment is Node.js and if not log an error and exit. if (typeof process === 'object' && typeof require === 'function') { - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); var address = "amqp://~0.0.0.0"; var message = new proton.Message(); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/examples/messenger/javascript/send.html ---------------------------------------------------------------------- diff --git a/examples/messenger/javascript/send.html b/examples/messenger/javascript/send.html index 174a0c6..a33e025 100644 --- a/examples/messenger/javascript/send.html +++ b/examples/messenger/javascript/send.html @@ -42,7 +42,7 @@ of 16777216 is fine, it is simply done here to illustrate how to do it. --> <script type="text/javascript">PROTON_TOTAL_MEMORY = 50000000;</script> -<script type="text/javascript" src="../../../node_modules/qpid-proton/lib/proton.js"></script> +<script type="text/javascript" src="../../../node_modules/qpid-proton-messenger/lib/proton-messenger.js"></script> <script type="text/javascript"> var message = new proton.Message(); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/examples/messenger/javascript/send.js ---------------------------------------------------------------------- diff --git a/examples/messenger/javascript/send.js b/examples/messenger/javascript/send.js index 39d40bd..608fab4 100755 --- a/examples/messenger/javascript/send.js +++ b/examples/messenger/javascript/send.js @@ -26,7 +26,7 @@ if (typeof process === 'object' && typeof require === 'function') { // It is not really necessary to do this for this application as the default // value of 16777216 is fine, it is simply done here to illustrate how to do it. PROTON_TOTAL_MEMORY = 50000000; - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); var address = "amqp://0.0.0.0"; var subject = "UK.WEATHER"; http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/examples/messenger/javascript/server.js ---------------------------------------------------------------------- diff --git a/examples/messenger/javascript/server.js b/examples/messenger/javascript/server.js index 1a9eabb..6015321 100755 --- a/examples/messenger/javascript/server.js +++ b/examples/messenger/javascript/server.js @@ -23,7 +23,7 @@ // Check if the environment is Node.js and if not log an error and exit. if (typeof process === 'object' && typeof require === 'function') { - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); var address = "amqp://~0.0.0.0"; var message = new proton.Message(); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/examples/messenger/javascript/spout.js ---------------------------------------------------------------------- diff --git a/examples/messenger/javascript/spout.js b/examples/messenger/javascript/spout.js index 16faa8e..013f79f 100755 --- a/examples/messenger/javascript/spout.js +++ b/examples/messenger/javascript/spout.js @@ -21,7 +21,7 @@ // Check if the environment is Node.js and if not log an error and exit. if (typeof process === 'object' && typeof require === 'function') { - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); console.log("spout not implemented yet"); process.exit(0); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/proton-c/bindings/javascript/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/proton-c/bindings/javascript/CMakeLists.txt b/proton-c/bindings/javascript/CMakeLists.txt index d10212c..ce78e3e 100644 --- a/proton-c/bindings/javascript/CMakeLists.txt +++ b/proton-c/bindings/javascript/CMakeLists.txt @@ -204,47 +204,48 @@ set_target_properties( LINK_FLAGS "-s \"WEBSOCKET_SUBPROTOCOL='AMQPWSB10'\" -${EMSCRIPTEN_LINK_OPTIMISATIONS}" ) -# Build the main JavaScript library called proton.js -add_executable(proton.js binding.c) -target_link_libraries(proton.js qpid-proton-bitcode) +# Build the main JavaScript library called proton-messenger.js +add_executable(proton-messenger.js binding.c) +target_link_libraries(proton-messenger.js qpid-proton-bitcode) set_target_properties( - proton.js + proton-messenger.js PROPERTIES COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${COMPILE_PLATFORM_FLAGS}" # The --memory-init-file 0 stops emscripten emitting a separate memory # initialization file, if this was enabled it makes packaging harder as - # applications would expect proton.js.mem to be served too. It's even more - # fiddly with node.js packages. This behaviour might be reinstated if the + # applications would expect proton-messenger.js.mem to be served too. It's even + # more fiddly with node.js packages. This behaviour might be reinstated if the # packaging mechanism improves. LINK_FLAGS "-s \"EXPORT_NAME='proton'\" -s \"WEBSOCKET_SUBPROTOCOL='AMQPWSB10'\" ${EMSCRIPTEN_LINK_OPTIMISATIONS} --memory-init-file 0 --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/binding-open.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/module.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/error.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/messenger.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/subscription.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/message.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-uuid.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-symbol.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-described.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-array.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-typed-number.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-long.js --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/data-binary.js --post-js ${CMAKE_CURRENT_SOURCE_DIR}/binding-close.js -s DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=\"[]\" -s EXPORTED_FUNCTIONS=\"['_pn_get_version_major', '_ pn_get_version_minor', '_pn_bytes', '_pn_error_text', '_pn_code', '_pn_messenger', '_pn_messenger_name', '_pn_messenger_set_blocking', '_pn_messenger_free', '_pn_messenger_errno', '_pn_messenger_error', '_pn_messenger_get_outgoing_window', '_pn_messenger_set_outgoing_window', '_pn_messenger_get_incoming_window', '_pn_messenger_set_incoming_window', '_pn_messenger_start', '_pn_messenger_stop', '_pn_messenger_stopped', '_pn_messenger_subscribe', '_pn_messenger_put', '_pn_messenger_status', '_pn_messenger_buffered', '_pn_messenger_settle', '_pn_messenger_outgoing_tracker', '_pn_messenger_recv', '_pn_messenger_receiving', '_pn_messenger_get', '_pn_messenger_incoming_tracker', '_pn_messenger_incoming_subscription', '_pn_messenger_accept', '_pn_messenger_reject', '_pn_messenger_outgoing', '_pn_messenger_incoming', '_pn_messenger_route', '_pn_messenger_rewrite', '_pn_messenger_set_passive', '_pn_messenger_selectable', '_pn_subscription_get_context', '_pn_subscription_set_context', '_pn_su bscription_address', '_pn_message', '_pn_message_id', '_pn_message_correlation_id', '_pn_message_free', '_pn_message_errno', '_pn_message_error', '_pn_message_clear', '_pn_message_is_inferred', '_pn_message_set_inferred', '_pn_message_is_durable', '_pn_message_set_durable', '_pn_message_get_priority', '_pn_message_set_priority', '_pn_message_get_ttl', '_pn_message_set_ttl', '_pn_message_is_first_acquirer', '_pn_message_set_first_acquirer', '_pn_message_get_delivery_count', '_pn_message_set_delivery_count', '_pn_message_get_user_id', '_pn_message_set_user_id', '_pn_message_get_address', '_pn_message_set_address', '_pn_message_get_subject', '_pn_message_set_subject', '_pn_message_get_reply_to', '_pn_message_set_reply_to', '_pn_message_get_content_type', '_pn_message_set_content_type', '_pn_message_get_content_encoding', '_pn_message_set_content_encoding', '_pn_message_get_expiry_time', '_pn_message_set_expiry_time', '_pn_message_get_creation_time', '_pn_message_set_creation_time', '_p n_message_get_group_id', '_pn_message_set_group_id', '_pn_message_get_group_sequence', '_pn_message_set_group_sequence', '_pn_message_get_reply_to_group_id', '_pn_message_set_reply_to_group_id', '_pn_message_encode', '_pn_message_decode', '_pn_message_instructions', '_pn_message_annotations', '_pn_message_properties', '_pn_message_body', '_pn_data', '_pn_data_free', '_pn_data_error', '_pn_data_errno', '_pn_data_clear', '_pn_data_rewind', '_pn_data_next', '_pn_data_prev', '_pn_data_enter', '_pn_data_exit', '_pn_data_lookup', '_pn_data_narrow', '_pn_data_widen', '_pn_data_type', '_pn_data_encode', '_pn_data_decode', '_pn_data_put_list', '_pn_data_put_map', '_pn_data_put_array', '_pn_data_put_described', '_pn_data_put_null', '_pn_data_put_bool', '_pn_data_put_ubyte', '_pn_data_put_byte', '_pn_data_put_ushort', '_pn_data_put_short', '_pn_data_put_uint', '_pn_data_put_int', '_pn_data_put_char', '_pn_data_put_ulong', '_pn_data_put_long', '_pn_data_put_timestamp', '_pn_data_put_float', '_p n_data_put_double', '_pn_data_put_decimal32', '_pn_data_put_decimal64', '_pn_data_put_decimal128', '_pn_data_put_uuid', '_pn_data_put_binary', '_pn_data_put_string', '_pn_data_put_symbol', '_pn_data_get_list', '_pn_data_get_map', '_pn_data_get_array', '_pn_data_is_array_described', '_pn_data_get_array_type', '_pn_data_is_described', '_pn_data_is_null', '_pn_data_get_bool', '_pn_data_get_ubyte', '_pn_data_get_byte', '_pn_data_get_ushort', '_pn_data_get_short', '_pn_data_get_uint', '_pn_data_get_int', '_pn_data_get_char', '_pn_data_get_ulong', '_pn_data_get_long', '_pn_data_get_timestamp', '_pn_data_get_float', '_pn_data_get_double', '_pn_data_get_decimal32', '_pn_data_get_decimal64', '_pn_data_get_decimal128', '_pn_data_get_uuid', '_pn_data_get_binary', '_pn_data_get_string', '_pn_data_get_symbol', '_pn_data_copy', '_pn_data_format', '_pn_data_dump', '_pn_selectable_readable', '_pn_selectable_is_reading', '_pn_selectable_writable', '_pn_selectable_is_writing', '_pn_selectable_is_term inal', '_pn_selectable_get_fd', '_pn_selectable_free']\"" ) -# This command packages up the compiled proton.js into a node.js package called -# qpid-proton and copies it to the <proton>/node_modules directory. This allows -# the node.js test and example programs to do proton = require("qpid-proton"); +# This command packages up the compiled proton-messenger.js into a node.js package +# called qpid-proton-messenger and copies it to the <proton>/node_modules directory. +# This allows the node.js test and example programs to do: +# var proton = require("qpid-proton-messenger"); add_custom_command( - TARGET proton.js + TARGET proton-messenger.js COMMAND ${CMAKE_COMMAND} -E copy_directory - ${CMAKE_CURRENT_SOURCE_DIR}/qpid-proton - ${PROJECT_SOURCE_DIR}/node_modules/qpid-proton + ${CMAKE_CURRENT_SOURCE_DIR}/qpid-proton-messenger + ${PROJECT_SOURCE_DIR}/node_modules/qpid-proton-messenger COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_BINARY_DIR}/proton.js - ${PROJECT_SOURCE_DIR}/node_modules/qpid-proton/lib - COMMENT "Building qpid-proton package for node.js" + ${CMAKE_CURRENT_BINARY_DIR}/proton-messenger.js + ${PROJECT_SOURCE_DIR}/node_modules/qpid-proton-messenger/lib + COMMENT "Building qpid-proton-messenger package for node.js" ) -# The cleanall target removes the qpid-proton package from <proton>/node_modules +# The cleanall target removes the qpid-proton-messenger package from <proton>/node_modules add_custom_target( cleanall COMMAND echo "CLEAN NODE MODULES" COMMAND ${CMAKE_COMMAND} -E remove_directory - ${PROJECT_SOURCE_DIR}/node_modules/qpid-proton + ${PROJECT_SOURCE_DIR}/node_modules/qpid-proton-messenger ) # If the docs target is specified and the jsdoc3 package for node.js has been http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/proton-c/bindings/javascript/README ---------------------------------------------------------------------- diff --git a/proton-c/bindings/javascript/README b/proton-c/bindings/javascript/README index 8bfde56..2dea949 100644 --- a/proton-c/bindings/javascript/README +++ b/proton-c/bindings/javascript/README @@ -216,12 +216,12 @@ In a browser it would look like (see send.html): 2. Load the library and create a message and messenger. In Node.js this would look like (see send.js): -var proton = require("qpid-proton"); +var proton = require("qpid-proton-messenger"); var message = new proton.Message(); var messenger = new proton.Messenger(); In a browser it would look like (see send.html): -<script type="text/javascript" src="../../../node_modules/qpid-proton/lib/proton.js"></script> +<script type="text/javascript" src="../../../node_modules/qpid-proton-messenger/lib/proton-messenger.js"></script> <script type="text/javascript"> var message = new proton.Message(); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/proton-c/bindings/javascript/qpid-proton-messenger/LICENSE ---------------------------------------------------------------------- diff --git a/proton-c/bindings/javascript/qpid-proton-messenger/LICENSE b/proton-c/bindings/javascript/qpid-proton-messenger/LICENSE new file mode 100644 index 0000000..6b0b127 --- /dev/null +++ b/proton-c/bindings/javascript/qpid-proton-messenger/LICENSE @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/proton-c/bindings/javascript/qpid-proton-messenger/README.md ---------------------------------------------------------------------- diff --git a/proton-c/bindings/javascript/qpid-proton-messenger/README.md b/proton-c/bindings/javascript/qpid-proton-messenger/README.md new file mode 100644 index 0000000..35d1917 --- /dev/null +++ b/proton-c/bindings/javascript/qpid-proton-messenger/README.md @@ -0,0 +1,94 @@ +**qpid-proton-messenger** +--------------------- +Apache qpid proton messenger AMQP 1.0 library +http://qpid.apache.org/proton/ +https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git + +This library provides JavaScript bindings for Apache qpid proton messenger giving AMQP 1.0 support to Node.js and browsers. + +**Important Note - Modern Browser Needed** +The JavaScript binding requires ArrayBuffer/TypedArray and WebSocket support. Both of these are available in most "modern" browser versions. The author has only tried running on FireFox and Chrome, though recent Safari, Opera and IE10+ *should* work too - YMMV. It might be possible to polyfill for older browsers but the author hasn't tried this. + +**Important Note - WebSocket Transport!!!** +Before going any further it is really important to realise that the JavaScript bindings to Proton are somewhat different to the bindings for other languages because of the restrictions of the execution environment. + +In particular it is very important to note that the JavaScript bindings by default use a WebSocket transport and not a TCP transport, so whilst it's possible to create Server style applications that clients can connect to (e.g. recv.js and send.js) note that: +JavaScript clients cannot *directly* talk to "normal" AMQP applications such as qpidd or (by default) the Java Broker because they use a standard TCP transport. + +This is a slightly irksome issue, but there's no getting away from it because it's a security restriction imposed by the browser environment. + +**Full README** +https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=blob;f=proton-c/bindings/javascript/README;h=8bfde56632a22bffce4afe791321f4900c5d38d2;hb=HEAD + +**Examples** +The examples in the main Proton repository are the best starting point: +https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=tree;f=examples/messenger/javascript;h=37964f32a6b3d63e802000b0a2a974ed017e4688;hb=HEAD + +In practice the examples follow a fairly similar pattern to the Python bindings the most important thing to bear in mind though is that JavaScript is completely asynchronous/non-blocking, which can catch the unwary. + +An application follows the following (rough) steps: + +(optional) Set the heap size. +It's important to realise that most of the library code is compiled C code and the runtime uses a "virtual heap" to support the underlying malloc/free. This is implemented internally as an ArrayBuffer with a default size of 16777216. + +To allocate a larger heap an application must set the PROTON_TOTAL_MEMORY global. In Node.js this would look like (see send.js): + + PROTON_TOTAL_MEMORY = 50000000; // Note no var - it needs to be global. + +In a browser it would look like (see send.html): + + <script type="text/javascript">PROTON_TOTAL_MEMORY = 50000000</script> + +Load the library and create a message and messenger. +In Node.js this would look like (see send.js): + + var proton = require("qpid-proton-messenger"); + var message = new proton.Message(); + var messenger = new proton.Messenger(); + +In a browser it would look like (see send.html): + + <script type="text/javascript" src="../../../node_modules/qpid-proton-messenger/lib/proton-messenger.js"></script> + <script type="text/javascript" > + var message = new proton.Message(); + var messenger = new proton.Messenger(); + +Set up event handlers as necessary. + + messenger.on('error', <error callback>); + messenger.on('work', <work callback>); + messenger.on('subscription', <subscription callback>); + +The work callback is triggered on WebSocket events, so in general you would use this to send and receive messages, for example in recv.js we have: + + var pumpData = function() { + while (messenger.incoming()) { + var t = messenger.get(message); + + console.log("Address: " + message.getAddress()); + console.log("Subject: " + message.getSubject()); + + // body is the body as a native JavaScript Object, useful for most real cases. + //console.log("Content: " + message.body); + + // data is the body as a proton.Data Object, used in this case because + // format() returns exactly the same representation as recv.c + console.log("Content: " + message.data.format()); + + messenger.accept(t); + } + }; + messenger.on('work', pumpData); + + +The subscription callback is triggered when the address provided in a call to + + messenger.subscribe(<address>); + +Gets resolved. An example of its usage can be found in qpid-config.js which is +a fully functioning and complete port of the python qpid-config tool. It also +illustrates how to do asynchronous request/response based applications. + +Aside from the asynchronous aspects the rest of the API is essentially the same +as the Python binding aside from minor things such as camel casing method names etc. + http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/proton-c/bindings/javascript/qpid-proton-messenger/lib/.gitignore ---------------------------------------------------------------------- diff --git a/proton-c/bindings/javascript/qpid-proton-messenger/lib/.gitignore b/proton-c/bindings/javascript/qpid-proton-messenger/lib/.gitignore new file mode 100644 index 0000000..2b1f291 --- /dev/null +++ b/proton-c/bindings/javascript/qpid-proton-messenger/lib/.gitignore @@ -0,0 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# Currently empty .gitignore +# Used to ensure git creates the otherwise empty directory http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/proton-c/bindings/javascript/qpid-proton-messenger/package.json ---------------------------------------------------------------------- diff --git a/proton-c/bindings/javascript/qpid-proton-messenger/package.json b/proton-c/bindings/javascript/qpid-proton-messenger/package.json new file mode 100644 index 0000000..31e818e --- /dev/null +++ b/proton-c/bindings/javascript/qpid-proton-messenger/package.json @@ -0,0 +1,15 @@ +{ + "name" : "qpid-proton-messenger", + "version": "0.9.0", + "description": "apache qpid proton messenger AMQP 1.0 library", + "homepage": "http://qpid.apache.org/proton", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git" + }, + "main" : "./lib/proton-messenger.js", + "dependencies": { + "ws": "0.5.0" + } +} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/proton-c/bindings/javascript/qpid-proton/LICENSE ---------------------------------------------------------------------- diff --git a/proton-c/bindings/javascript/qpid-proton/LICENSE b/proton-c/bindings/javascript/qpid-proton/LICENSE deleted file mode 100644 index 6b0b127..0000000 --- a/proton-c/bindings/javascript/qpid-proton/LICENSE +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/proton-c/bindings/javascript/qpid-proton/README.md ---------------------------------------------------------------------- diff --git a/proton-c/bindings/javascript/qpid-proton/README.md b/proton-c/bindings/javascript/qpid-proton/README.md deleted file mode 100644 index db026c7..0000000 --- a/proton-c/bindings/javascript/qpid-proton/README.md +++ /dev/null @@ -1,4 +0,0 @@ -qpid-proton ------------ - -apache qpid proton messenger AMQP 1.0 library http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/proton-c/bindings/javascript/qpid-proton/lib/.gitignore ---------------------------------------------------------------------- diff --git a/proton-c/bindings/javascript/qpid-proton/lib/.gitignore b/proton-c/bindings/javascript/qpid-proton/lib/.gitignore deleted file mode 100644 index 2b1f291..0000000 --- a/proton-c/bindings/javascript/qpid-proton/lib/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Currently empty .gitignore -# Used to ensure git creates the otherwise empty directory http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/proton-c/bindings/javascript/qpid-proton/package.json ---------------------------------------------------------------------- diff --git a/proton-c/bindings/javascript/qpid-proton/package.json b/proton-c/bindings/javascript/qpid-proton/package.json deleted file mode 100644 index ffc5ebe..0000000 --- a/proton-c/bindings/javascript/qpid-proton/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name" : "qpid-proton", - "version": "0.7.0", - "description": "apache qpid proton messenger AMQP 1.0 library", - "repository": { - "type": "svn", - "url": "https://svn.apache.org/repos/asf/qpid/proton/trunk/" - }, - "main" : "./lib/proton.js", - "dependencies": {} -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/tests/javascript/codec.js ---------------------------------------------------------------------- diff --git a/tests/javascript/codec.js b/tests/javascript/codec.js index ce4890d..193c878 100755 --- a/tests/javascript/codec.js +++ b/tests/javascript/codec.js @@ -36,7 +36,7 @@ if (typeof process === 'object' && typeof require === 'function') { // This allows us to test a really big string. PROTON_TOTAL_MEMORY = 140000000; PROTON_TOTAL_STACK = 25000000; // Needs to be bigger than the biggest string. - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); // Extend TestCase by creating a prototype instance and adding test methods as properties. var DataTest = new unittest.TestCase(); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/tests/javascript/message.js ---------------------------------------------------------------------- diff --git a/tests/javascript/message.js b/tests/javascript/message.js index dca6f68..e714922 100755 --- a/tests/javascript/message.js +++ b/tests/javascript/message.js @@ -28,7 +28,7 @@ if (typeof process === 'object' && typeof require === 'function') { var unittest = require("./unittest.js"); var assert = require("assert"); - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); /** * JavaScript Implementation of Python's range() function taken from: http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/tests/javascript/msgr-recv.js ---------------------------------------------------------------------- diff --git a/tests/javascript/msgr-recv.js b/tests/javascript/msgr-recv.js index 383aad4..24bdcae 100755 --- a/tests/javascript/msgr-recv.js +++ b/tests/javascript/msgr-recv.js @@ -204,7 +204,7 @@ if (typeof process === 'object' && typeof require === 'function') { // This allows us to test a really big string. PROTON_TOTAL_MEMORY = 140000000; PROTON_TOTAL_STACK = 25000000; // Needs to be bigger than the biggest string. - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); var opts = {}; opts.subscriptions = 'amqp://~0.0.0.0'; http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/tests/javascript/msgr-send-common.js ---------------------------------------------------------------------- diff --git a/tests/javascript/msgr-send-common.js b/tests/javascript/msgr-send-common.js index 8a5f98e..4e68097 100644 --- a/tests/javascript/msgr-send-common.js +++ b/tests/javascript/msgr-send-common.js @@ -21,7 +21,7 @@ /** * This file is essentially a "module" that is common to msgr-send.js and msgr-send.html. * It defines the Statistics and MessengerSend classes and if the environment is Node.js - * it will import qpid-proton and export MessengerSend for use in msgr-send.js. + * it will import qpid-proton-messenger and export MessengerSend for use in msgr-send.js. * Because it's really a module/library trying to execute msgr-send-common.js won't * itself do anything terribly exciting. */ @@ -239,7 +239,7 @@ console.log("messenger.getBufferedAmount() = " + messenger.getBufferedAmount()); // If running in Node.js import the proton library and export MessengerSend. if (typeof module === 'object') { - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); module.exports.MessengerSend = MessengerSend; } http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/tests/javascript/msgr-send.html ---------------------------------------------------------------------- diff --git a/tests/javascript/msgr-send.html b/tests/javascript/msgr-send.html index 0e688c2..531d886 100644 --- a/tests/javascript/msgr-send.html +++ b/tests/javascript/msgr-send.html @@ -43,7 +43,7 @@ --> <script type="text/javascript">PROTON_TOTAL_MEMORY = 140000000;</script> <script type="text/javascript">PROTON_TOTAL_STACK = 25000000;</script> -<script type="text/javascript" src="../../node_modules/qpid-proton/lib/proton.js"></script> +<script type="text/javascript" src="../../node_modules/qpid-proton-messenger/lib/proton-messenger.js"></script> <script type="text/javascript" src="./msgr-send-common.js"></script> <script type="text/javascript"> http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/tests/javascript/msgr-send.js ---------------------------------------------------------------------- diff --git a/tests/javascript/msgr-send.js b/tests/javascript/msgr-send.js index 8b018a7..124f29e 100755 --- a/tests/javascript/msgr-send.js +++ b/tests/javascript/msgr-send.js @@ -38,7 +38,7 @@ if (typeof process === 'object' && typeof require === 'function') { // This allows us to test a really big string. PROTON_TOTAL_MEMORY = 140000000; PROTON_TOTAL_STACK = 25000000; // Needs to be bigger than the biggest string. - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); var benchmark = require("./msgr-send-common.js"); var opts = {}; http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f537eb89/tests/javascript/soak.js ---------------------------------------------------------------------- diff --git a/tests/javascript/soak.js b/tests/javascript/soak.js index 8ecce6a..50bf921 100755 --- a/tests/javascript/soak.js +++ b/tests/javascript/soak.js @@ -21,7 +21,7 @@ // Check if the environment is Node.js and if not log an error and exit. if (typeof process === 'object' && typeof require === 'function') { - var proton = require("qpid-proton"); + var proton = require("qpid-proton-messenger"); var addr = 'guest:guest@localhost:5673'; //var addr = 'localhost:5673'; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
