From 96075885279e040a25c5b193f38e2df77158a9ec Mon Sep 17 00:00:00 2001 From: tejasvedagiri Date: Tue, 18 Jul 2017 22:50:21 +0530 Subject: [PATCH] first commit --- .gitignore | 9 + .idea/.name | 1 + .idea/compiler.xml | 22 + .idea/copyright/profiles_settings.xml | 3 + .idea/gradle.xml | 12 + .idea/misc.xml | 46 + .idea/modules.xml | 9 + .idea/runConfigurations.xml | 12 + .../AutomaticBulldozeV2.dll | Bin 0 -> 19456 bytes JUNK/OO/.gitignore | 9 + JUNK/OO/.idea/compiler.xml | 22 + JUNK/OO/.idea/copyright/profiles_settings.xml | 3 + JUNK/OO/.idea/gradle.xml | 18 + JUNK/OO/.idea/misc.xml | 46 + JUNK/OO/.idea/modules.xml | 9 + JUNK/OO/.idea/runConfigurations.xml | 12 + JUNK/OO/app/.gitignore | 1 + JUNK/OO/app/build.gradle | 30 + JUNK/OO/app/proguard-rules.pro | 25 + .../tejas/oo/ExampleInstrumentedTest.java | 26 + JUNK/OO/app/src/main/AndroidManifest.xml | 21 + .../com/example/tejas/oo/MainActivity.java | 89 + .../app/src/main/res/layout/activity_main.xml | 18 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3418 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 4208 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2206 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2555 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4842 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 6114 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 7718 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10056 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 10486 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 14696 bytes JUNK/OO/app/src/main/res/values/colors.xml | 6 + JUNK/OO/app/src/main/res/values/strings.xml | 3 + JUNK/OO/app/src/main/res/values/styles.xml | 11 + .../com/example/tejas/oo/ExampleUnitTest.java | 17 + JUNK/OO/build.gradle | 33 + JUNK/OO/gradle.properties | 17 + JUNK/OO/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53636 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + JUNK/OO/gradlew | 160 + JUNK/OO/gradlew.bat | 90 + JUNK/OO/settings.gradle | 1 + JUNK/SocketIO/.gitignore | 9 + JUNK/SocketIO/.idea/compiler.xml | 22 + .../.idea/copyright/profiles_settings.xml | 3 + JUNK/SocketIO/.idea/gradle.xml | 18 + JUNK/SocketIO/.idea/misc.xml | 46 + JUNK/SocketIO/.idea/modules.xml | 9 + JUNK/SocketIO/.idea/runConfigurations.xml | 12 + JUNK/SocketIO/app/.gitignore | 1 + JUNK/SocketIO/app/build.gradle | 35 + JUNK/SocketIO/app/proguard-rules.pro | 25 + .../socketio/ExampleInstrumentedTest.java | 26 + .../SocketIO/app/src/main/AndroidManifest.xml | 22 + .../example/tejas/socketio/MainActivity.java | 36 + .../java/com/example/tejas/socketio/test.java | 17 + .../app/src/main/res/layout/activity_main.xml | 18 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3418 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 4208 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2206 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2555 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4842 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 6114 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 7718 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10056 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 10486 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 14696 bytes .../app/src/main/res/values/colors.xml | 6 + .../app/src/main/res/values/strings.xml | 3 + .../app/src/main/res/values/styles.xml | 11 + .../tejas/socketio/ExampleUnitTest.java | 17 + JUNK/SocketIO/build.gradle | 23 + JUNK/SocketIO/gradle.properties | 17 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53636 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + JUNK/SocketIO/gradlew | 160 + JUNK/SocketIO/gradlew.bat | 90 + JUNK/SocketIO/settings.gradle | 1 + JUNK/WebSocket-for-Python-master/.gitignore | 5 + JUNK/WebSocket-for-Python-master/.travis.yml | 20 + JUNK/WebSocket-for-Python-master/CHANGELOG.md | 313 + JUNK/WebSocket-for-Python-master/LICENSE | 26 + JUNK/WebSocket-for-Python-master/MANIFEST.in | 3 + JUNK/WebSocket-for-Python-master/README.md | 17 + .../WebSocket-for-Python-master/docs/Makefile | 153 + JUNK/WebSocket-for-Python-master/docs/conf.py | 301 + .../docs/index.rst | 70 + .../WebSocket-for-Python-master/docs/make.bat | 190 + .../docs/sources/basics.rst | 40 + .../docs/sources/browser.rst | 16 + .../docs/sources/clienttutorial.rst | 124 + .../docs/sources/conformance.rst | 13 + .../docs/sources/credits.rst | 10 + .../docs/sources/examples.rst | 24 + .../docs/sources/install.rst | 30 + .../docs/sources/maintainer/design.rst | 62 + .../docs/sources/maintainer/documenting.rst | 60 + .../docs/sources/maintainer/releasing.rst | 50 + .../docs/sources/maintainer/rules.rst | 14 + .../docs/sources/maintainer/testing.rst | 94 + .../docs/sources/managertutorial.rst | 96 + .../docs/sources/performance.rst | 17 + .../docs/sources/requirements.rst | 47 + .../docs/sources/servertutorial.rst | 108 + .../docs/sources/ws4py.client.rst | 35 + .../docs/sources/ws4py.rst | 75 + .../docs/sources/ws4py.server.rst | 35 + .../example/basic/app.py | 69 + .../example/basic/index.html | 66 + .../example/bug167_client.py | 65 + .../example/droid_sensor.py | 102 + .../example/droid_sensor_cherrypy_server.py | 94 + .../example/echo_chaussette_server.py | 41 + .../example/echo_cherrypy_server.py | 119 + .../example/echo_cherrypy_server_nojquery.py | 120 + .../example/echo_client.py | 30 + .../example/echo_gevent_client.py | 41 + .../example/echo_gevent_server.py | 149 + .../example/mocking_data_source.py | 56 + .../example/server.crt | 13 + .../example/server.key | 15 + .../example/static/css/style.css | 18 + .../example/static/js/droidsensor.js | 113 + .../example/websensors/app.py | 300 + .../example/websensors/static/css/style.css | 10 + .../websensors/static/css/style.min.css | 1 + .../websensors/static/js/drawingboard.js | 198 + .../websensors/static/js/drawingboard.min.js | 1 + .../example/websensors/static/robots.txt | 3 + .../apple-touch-icon-precomposed.png | Bin 0 -> 1226 bytes .../static/vendors/initializr/css/main.css | 394 + .../vendors/initializr/css/main.min.css | 1 + .../vendors/initializr/css/normalize.css | 527 ++ .../vendors/initializr/css/normalize.min.css | 1 + .../static/vendors/initializr/favicon.ico | Bin 0 -> 766 bytes .../static/vendors/initializr/js/main.js | 1 + .../static/vendors/initializr/js/plugins.js | 24 + .../modernizr-2.6.2-respond-1.1.0.min.js | 11 + .../static/vendors/jcanvas/jcanvas.min.js | 69 + .../websensors/templates/.cache/board.html.py | 33 + .../websensors/templates/.cache/index.html.py | 32 + .../example/websensors/templates/404.html | 85 + .../example/websensors/templates/board.html | 41 + .../example/websensors/templates/index.html | 113 + .../requirements/py2kreqs.txt | 7 + .../requirements/py3kreqs.txt | 7 + .../requirements/rtd.txt | 5 + JUNK/WebSocket-for-Python-master/setup.py | 72 + .../test/__init__.py | 0 .../test/autobahn_test_servers.py | 277 + .../test/fuzzingclient.json | 52 + .../test/test_cherrypy.py | 106 + .../test/test_client.py | 288 + .../test/test_frame.py | 307 + .../test/test_logger.py | 64 + .../test/test_manager.py | 286 + .../test/test_messaging.py | 128 + .../test/test_stream.py | 410 + .../test/test_utils.py | 24 + .../test/test_websocket.py | 187 + JUNK/WebSocket-for-Python-master/tox.ini | 10 + .../WebSocket-for-Python-master/ws4py/LICENSE | 29 + .../ws4py/__init__.py | 67 + .../ws4py/async_websocket.py | 126 + .../ws4py/client/__init__.py | 344 + .../ws4py/client/geventclient.py | 92 + .../ws4py/client/threadedclient.py | 98 + .../ws4py/client/tornadoclient.py | 155 + .../ws4py/compat.py | 46 + JUNK/WebSocket-for-Python-master/ws4py/exc.py | 27 + .../ws4py/framing.py | 273 + .../ws4py/manager.py | 368 + .../ws4py/messaging.py | 169 + .../ws4py/server/__init__.py | 0 .../ws4py/server/cherrypyserver.py | 382 + .../ws4py/server/geventserver.py | 121 + .../ws4py/server/tulipserver.py | 224 + .../ws4py/server/wsgirefserver.py | 157 + .../ws4py/server/wsgiutils.py | 162 + .../ws4py/streaming.py | 319 + .../ws4py/utf8validator.py | 117 + .../ws4py/websocket.py | 535 ++ JUNK/Websocket/.gitignore | 9 + JUNK/Websocket/.idea/compiler.xml | 22 + .../.idea/copyright/profiles_settings.xml | 3 + JUNK/Websocket/.idea/gradle.xml | 18 + .../inspectionProfiles/Project_Default.xml | 10 + .../inspectionProfiles/profiles_settings.xml | 7 + JUNK/Websocket/.idea/misc.xml | 46 + JUNK/Websocket/.idea/modules.xml | 9 + JUNK/Websocket/.idea/runConfigurations.xml | 12 + JUNK/Websocket/app/.gitignore | 1 + JUNK/Websocket/app/build.gradle | 35 + JUNK/Websocket/app/proguard-rules.pro | 25 + .../websocket/ExampleInstrumentedTest.java | 26 + .../app/src/main/AndroidManifest.xml | 23 + .../com/example/tejas/websocket/Client.java | 100 + .../example/tejas/websocket/MainActivity.java | 62 + .../app/src/main/res/layout/activity_main.xml | 19 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3418 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 4208 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2206 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2555 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4842 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 6114 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 7718 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10056 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 10486 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 14696 bytes .../app/src/main/res/values/colors.xml | 6 + .../app/src/main/res/values/strings.xml | 3 + .../app/src/main/res/values/styles.xml | 11 + .../tejas/websocket/ExampleUnitTest.java | 17 + JUNK/Websocket/build.gradle | 24 + JUNK/Websocket/gradle.properties | 17 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53636 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + JUNK/Websocket/gradlew | 160 + JUNK/Websocket/gradlew.bat | 90 + JUNK/Websocket/settings.gradle | 1 + JUNK/aaa/01 MOUSE MODE.cfg | 41 + JUNK/aaa/02 JOYPAD MODE.cfg | 41 + JUNK/aaa/03 KEYBOARD MODE.cfg | 32 + JUNK/aaa/Changes.txt | 355 + JUNK/aaa/HELP/01-MOUSE-MODE.png | Bin 0 -> 242466 bytes JUNK/aaa/HELP/02-JOYPAD-MODE.png | Bin 0 -> 233486 bytes JUNK/aaa/HELP/03-KEYBOARD-MODE.png | Bin 0 -> 252339 bytes JUNK/aaa/IMAGES/01-MOUSE-MODE.png | Bin 0 -> 242466 bytes JUNK/aaa/IMAGES/02-JOYPAD-MODE.png | Bin 0 -> 233486 bytes JUNK/aaa/IMAGES/03-KEYBOARD-MODE.png | Bin 0 -> 252339 bytes JUNK/aaa/IMAGES/MODE-CUSTOM.jpg | Bin 0 -> 183868 bytes JUNK/aaa/IMAGES/MODE-PLAYSTATION.jpg | Bin 0 -> 146844 bytes JUNK/aaa/IMAGES/MODE-XBOX.jpg | Bin 0 -> 165558 bytes JUNK/aaa/IMAGES/SLOT-001.png | Bin 0 -> 75133 bytes JUNK/aaa/IMAGES/SLOT-002.png | Bin 0 -> 75630 bytes JUNK/aaa/IMAGES/SLOT-003.png | Bin 0 -> 75591 bytes JUNK/aaa/IMAGES/SLOT-004.png | Bin 0 -> 75403 bytes JUNK/aaa/IMAGES/SLOT-005.png | Bin 0 -> 75473 bytes JUNK/aaa/IMAGES/SLOT-006.png | Bin 0 -> 75719 bytes JUNK/aaa/IMAGES/SLOT-007.png | Bin 0 -> 75297 bytes JUNK/aaa/IMAGES/SLOT-008.png | Bin 0 -> 75744 bytes JUNK/aaa/IMAGES/SLOT-009.png | Bin 0 -> 75752 bytes JUNK/aaa/IMAGES/SLOT-010.png | Bin 0 -> 75854 bytes .../IMAGES/TEMPLATE (PHOTOSHOP)/TEMPLATE.psd | Bin 0 -> 1518636 bytes JUNK/aaa/JoyToKey.exe | Bin 0 -> 1952768 bytes JUNK/aaa/JoyToKey.ini | 49 + JUNK/aaa/JoyToKey.log | 88 + JUNK/aaa/Readme.txt | 162 + JUNK/aaa/SLOT 001.cfg | 41 + JUNK/aaa/SLOT 002.cfg | 41 + JUNK/aaa/SLOT 003.cfg | 41 + JUNK/aaa/SLOT 004.cfg | 41 + JUNK/aaa/SLOT 005.cfg | 41 + JUNK/aaa/SLOT 006.cfg | 41 + JUNK/aaa/SLOT 007.cfg | 41 + JUNK/aaa/SLOT 008.cfg | 41 + JUNK/aaa/SLOT 009.cfg | 41 + JUNK/aaa/SLOT 010.cfg | 41 + JUNK/aaa/SOUNDS/01 (F).mp3 | Bin 0 -> 10030 bytes JUNK/aaa/SOUNDS/02 (F).mp3 | Bin 0 -> 9612 bytes JUNK/aaa/SOUNDS/03 (F).mp3 | Bin 0 -> 11283 bytes JUNK/aaa/SOUNDS/04 (F).mp3 | Bin 0 -> 12537 bytes JUNK/aaa/SOUNDS/05 (F).mp3 | Bin 0 -> 12955 bytes JUNK/aaa/SOUNDS/06 (F).mp3 | Bin 0 -> 13791 bytes JUNK/aaa/SOUNDS/07 (F).mp3 | Bin 0 -> 12537 bytes JUNK/aaa/SOUNDS/08 (F).mp3 | Bin 0 -> 10866 bytes JUNK/aaa/SOUNDS/09 (F).mp3 | Bin 0 -> 12955 bytes JUNK/aaa/SOUNDS/10 (F).mp3 | Bin 0 -> 10866 bytes JUNK/aaa/SOUNDS/11 (F).mp3 | Bin 0 -> 11701 bytes JUNK/aaa/SOUNDS/12 (F).mp3 | Bin 0 -> 13791 bytes JUNK/aaa/SOUNDS/13 (F).mp3 | Bin 0 -> 21732 bytes JUNK/aaa/SOUNDS/14 (F).mp3 | Bin 0 -> 16299 bytes JUNK/aaa/SOUNDS/15 (F).mp3 | Bin 0 -> 15881 bytes JUNK/aaa/SOUNDS/16 (F).mp3 | Bin 0 -> 15463 bytes JUNK/aaa/SOUNDS/17 (F).mp3 | Bin 0 -> 15881 bytes JUNK/aaa/SOUNDS/18 (F).mp3 | Bin 0 -> 13791 bytes JUNK/aaa/SOUNDS/19 (F).mp3 | Bin 0 -> 18389 bytes JUNK/aaa/SOUNDS/20 (F).mp3 | Bin 0 -> 12537 bytes JUNK/aaa/SOUNDS/MODE - BASIC CONTROLS (F).mp3 | Bin 0 -> 62274 bytes JUNK/aaa/SOUNDS/MODE - BASIC MODES (F).mp3 | Bin 0 -> 19643 bytes JUNK/aaa/SOUNDS/MODE - JOYPAD MODE (M).mp3 | Bin 0 -> 19225 bytes JUNK/aaa/SOUNDS/MODE - KEYBOARD MODE (F).mp3 | Bin 0 -> 16299 bytes JUNK/aaa/SOUNDS/MODE - MOUSE MODE (M).mp3 | Bin 0 -> 13373 bytes .../aaa/SOUNDS/MODE - PC MODE (F IRELAND).mp3 | Bin 0 -> 16299 bytes JUNK/aaa/SOUNDS/MODE - PC MODE (F).mp3 | Bin 0 -> 17553 bytes JUNK/aaa/SOUNDS/MODE - PC MODE (M).mp3 | Bin 0 -> 17135 bytes JUNK/aaa/SOUNDS/MODE - PC MODES (F).mp3 | Bin 0 -> 20061 bytes .../SOUNDS/MODE - PC SPECIAL MODES (F).mp3 | Bin 0 -> 27584 bytes JUNK/aaa/SOUNDS/MODE - PLAY MODE (F).mp3 | Bin 0 -> 15463 bytes JUNK/aaa/SOUNDS/MODE - PLAY MODE (M).mp3 | Bin 0 -> 18389 bytes JUNK/aaa/SOUNDS/MODE - PLAY MODES (F).mp3 | Bin 0 -> 15881 bytes .../MODE - PLAYSTATION MODE (F IRELAND).mp3 | Bin 0 -> 20479 bytes .../SOUNDS/MODE - PLAYSTATION MODE (F).mp3 | Bin 0 -> 27166 bytes .../SOUNDS/MODE - PLAYSTATION MODES (F).mp3 | Bin 0 -> 23822 bytes .../MODE - PLAYSTATION SPECIAL MODES (F).mp3 | Bin 0 -> 31763 bytes JUNK/aaa/SOUNDS/MODE - SLOTS 1-10 (F).mp3 | Bin 0 -> 26330 bytes JUNK/aaa/SOUNDS/MODE - SLOTS 11-20 (F).mp3 | Bin 0 -> 31346 bytes .../aaa/SOUNDS/MODE - TEXT ENTRY MODE (F).mp3 | Bin 0 -> 20479 bytes .../MODE - TOGGLE FULL SCREEN MODE (F).mp3 | Bin 0 -> 25912 bytes .../SOUNDS/MODE - XBOX MODE (F IRELAND).mp3 | Bin 0 -> 20061 bytes JUNK/aaa/SOUNDS/MODE - XBOX MODE (M).mp3 | Bin 0 -> 25912 bytes JUNK/aaa/SOUNDS/MODE - XBOX MODES (F).mp3 | Bin 0 -> 22568 bytes .../SOUNDS/MODE - XBOX SPECIAL MODES (F).mp3 | Bin 0 -> 28838 bytes JUNK/aaa/TEMPLATE - BASIC FPS GAME.cfg | 41 + JUNK/aaa/VistaAPI.dll | Bin 0 -> 68608 bytes JUNK/chat-example-master/.gitignore | 1 + JUNK/chat-example-master/README.md | 13 + JUNK/chat-example-master/app.json | 22 + JUNK/chat-example-master/index.html | 39 + JUNK/chat-example-master/index.js | 35 + JUNK/chat-example-master/package.json | 23 + JUNK/socket.io-client-java-master/.gitignore | 16 + JUNK/socket.io-client-java-master/.travis.yml | 5 + JUNK/socket.io-client-java-master/History.md | 110 + JUNK/socket.io-client-java-master/LICENSE | 32 + JUNK/socket.io-client-java-master/README.md | 182 + JUNK/socket.io-client-java-master/pom.xml | 239 + .../main/java/io/socket/backo/Backoff.java | 56 + .../src/main/java/io/socket/client/Ack.java | 11 + .../src/main/java/io/socket/client/IO.java | 98 + .../main/java/io/socket/client/Manager.java | 623 ++ .../src/main/java/io/socket/client/On.java | 23 + .../main/java/io/socket/client/Socket.java | 492 ++ .../io/socket/client/SocketIOException.java | 20 + .../src/main/java/io/socket/client/Url.java | 73 + .../java/io/socket/hasbinary/HasBinary.java | 63 + .../main/java/io/socket/parser/Binary.java | 127 + .../main/java/io/socket/parser/Packet.java | 22 + .../main/java/io/socket/parser/Parser.java | 277 + .../java/io/socket/backo/BackoffTest.java | 47 + .../java/io/socket/client/Connection.java | 123 + .../java/io/socket/client/ConnectionTest.java | 945 +++ .../java/io/socket/client/ExecutionTest.java | 49 + .../io/socket/client/SSLConnectionTest.java | 118 + .../client/ServerConnectionNamespaceTest.java | 12 + .../socket/client/ServerConnectionTest.java | 361 + .../java/io/socket/client/SocketTest.java | 171 + .../test/java/io/socket/client/UrlTest.java | 72 + .../socket/client/executions/Connection.java | 24 + .../client/executions/ConnectionFailure.java | 36 + .../client/executions/ImmediateClose.java | 29 + .../io/socket/hasbinary/HasBinaryTest.java | 73 + .../java/io/socket/parser/ByteArrayTest.java | 105 + .../test/java/io/socket/parser/Helpers.java | 99 + .../java/io/socket/parser/ParserTest.java | 67 + .../test/java/io/socket/util/Optional.java | 44 + .../src/test/resources/cert.pem | 10 + .../src/test/resources/key.pem | 9 + .../src/test/resources/keystore.jks | Bin 0 -> 859 bytes .../src/test/resources/logging.properties | 8 + .../src/test/resources/package.json | 6 + .../src/test/resources/server.js | 126 + Server File/index.html | 16 + Server File/node_modules/.bin/mime | 15 + Server File/node_modules/.bin/mime.cmd | 7 + Server File/node_modules/accepts/HISTORY.md | 212 + Server File/node_modules/accepts/LICENSE | 23 + Server File/node_modules/accepts/README.md | 135 + Server File/node_modules/accepts/index.js | 231 + Server File/node_modules/accepts/package.json | 113 + Server File/node_modules/after/.npmignore | 2 + Server File/node_modules/after/.travis.yml | 12 + Server File/node_modules/after/LICENCE | 19 + Server File/node_modules/after/README.md | 115 + Server File/node_modules/after/index.js | 28 + Server File/node_modules/after/package.json | 103 + .../node_modules/after/test/after-test.js | 120 + .../node_modules/array-flatten/LICENSE | 21 + .../node_modules/array-flatten/README.md | 43 + .../array-flatten/array-flatten.js | 64 + .../node_modules/array-flatten/package.json | 96 + .../node_modules/arraybuffer.slice/.npmignore | 17 + .../node_modules/arraybuffer.slice/Makefile | 8 + .../node_modules/arraybuffer.slice/README.md | 17 + .../node_modules/arraybuffer.slice/index.js | 29 + .../arraybuffer.slice/package.json | 72 + .../arraybuffer.slice/test/slice-buffer.js | 227 + Server File/node_modules/backo2/.npmignore | 1 + Server File/node_modules/backo2/History.md | 12 + Server File/node_modules/backo2/Makefile | 8 + Server File/node_modules/backo2/Readme.md | 34 + .../node_modules/backo2/component.json | 11 + Server File/node_modules/backo2/index.js | 85 + Server File/node_modules/backo2/package.json | 78 + Server File/node_modules/backo2/test/index.js | 18 + .../base64-arraybuffer/.npmignore | 3 + .../base64-arraybuffer/.travis.yml | 19 + .../base64-arraybuffer/LICENSE-MIT | 22 + .../node_modules/base64-arraybuffer/README.md | 20 + .../lib/base64-arraybuffer.js | 67 + .../base64-arraybuffer/package.json | 97 + Server File/node_modules/base64id/.npmignore | 3 + Server File/node_modules/base64id/LICENSE | 22 + Server File/node_modules/base64id/README.md | 18 + .../node_modules/base64id/lib/base64id.js | 103 + .../node_modules/base64id/package.json | 89 + .../node_modules/better-assert/.npmignore | 4 + .../node_modules/better-assert/History.md | 15 + .../node_modules/better-assert/Makefile | 5 + .../node_modules/better-assert/Readme.md | 61 + .../node_modules/better-assert/example.js | 10 + .../node_modules/better-assert/index.js | 38 + .../node_modules/better-assert/package.json | 100 + Server File/node_modules/bignumber.js/LICENCE | 23 + .../node_modules/bignumber.js/README.md | 389 + .../node_modules/bignumber.js/bignumber.js | 2745 +++++++ .../bignumber.js/bignumber.js.map | 1 + .../bignumber.js/bignumber.min.js | 3 + .../node_modules/bignumber.js/bower.json | 36 + .../node_modules/bignumber.js/doc/API.html | 2198 ++++++ .../node_modules/bignumber.js/package.json | 102 + Server File/node_modules/blob/.npmignore | 2 + Server File/node_modules/blob/.zuul.yml | 14 + Server File/node_modules/blob/Makefile | 14 + Server File/node_modules/blob/README.md | 14 + Server File/node_modules/blob/index.js | 96 + Server File/node_modules/blob/package.json | 77 + Server File/node_modules/blob/test/index.js | 94 + Server File/node_modules/callsite/.npmignore | 4 + Server File/node_modules/callsite/History.md | 10 + Server File/node_modules/callsite/Makefile | 6 + Server File/node_modules/callsite/Readme.md | 44 + Server File/node_modules/callsite/index.js | 10 + .../node_modules/callsite/package.json | 77 + .../node_modules/component-bind/.npmignore | 4 + .../node_modules/component-bind/History.md | 13 + .../node_modules/component-bind/Makefile | 7 + .../node_modules/component-bind/Readme.md | 64 + .../component-bind/component.json | 13 + .../node_modules/component-bind/index.js | 23 + .../node_modules/component-bind/package.json | 81 + .../node_modules/component-emitter/History.md | 68 + .../node_modules/component-emitter/LICENSE | 24 + .../node_modules/component-emitter/Readme.md | 74 + .../node_modules/component-emitter/index.js | 163 + .../component-emitter/package.json | 218 + .../node_modules/component-inherit/.npmignore | 3 + .../node_modules/component-inherit/History.md | 5 + .../node_modules/component-inherit/Makefile | 16 + .../node_modules/component-inherit/Readme.md | 24 + .../component-inherit/component.json | 10 + .../node_modules/component-inherit/index.js | 7 + .../component-inherit/package.json | 78 + .../component-inherit/test/inherit.js | 21 + .../content-disposition/HISTORY.md | 50 + .../node_modules/content-disposition/LICENSE | 22 + .../content-disposition/README.md | 141 + .../node_modules/content-disposition/index.js | 445 ++ .../content-disposition/package.json | 110 + .../node_modules/content-type/HISTORY.md | 14 + Server File/node_modules/content-type/LICENSE | 22 + .../node_modules/content-type/README.md | 92 + .../node_modules/content-type/index.js | 216 + .../node_modules/content-type/package.json | 104 + .../node_modules/cookie-signature/.npmignore | 4 + .../node_modules/cookie-signature/History.md | 38 + .../node_modules/cookie-signature/Readme.md | 42 + .../node_modules/cookie-signature/index.js | 51 + .../cookie-signature/package.json | 92 + Server File/node_modules/cookie/HISTORY.md | 118 + Server File/node_modules/cookie/LICENSE | 24 + Server File/node_modules/cookie/README.md | 220 + Server File/node_modules/cookie/index.js | 195 + Server File/node_modules/cookie/package.json | 107 + Server File/node_modules/core-util-is/LICENSE | 19 + .../node_modules/core-util-is/README.md | 3 + .../node_modules/core-util-is/float.patch | 604 ++ .../node_modules/core-util-is/lib/util.js | 107 + .../node_modules/core-util-is/package.json | 94 + Server File/node_modules/core-util-is/test.js | 68 + Server File/node_modules/debug/.coveralls.yml | 1 + Server File/node_modules/debug/.eslintrc | 11 + Server File/node_modules/debug/.npmignore | 9 + Server File/node_modules/debug/.travis.yml | 14 + Server File/node_modules/debug/CHANGELOG.md | 352 + Server File/node_modules/debug/LICENSE | 19 + Server File/node_modules/debug/Makefile | 50 + Server File/node_modules/debug/README.md | 312 + Server File/node_modules/debug/component.json | 19 + Server File/node_modules/debug/karma.conf.js | 70 + Server File/node_modules/debug/node.js | 1 + Server File/node_modules/debug/package.json | 131 + Server File/node_modules/debug/src/browser.js | 185 + Server File/node_modules/debug/src/debug.js | 202 + Server File/node_modules/debug/src/index.js | 10 + Server File/node_modules/debug/src/node.js | 246 + Server File/node_modules/depd/History.md | 84 + Server File/node_modules/depd/LICENSE | 22 + Server File/node_modules/depd/Readme.md | 281 + Server File/node_modules/depd/index.js | 521 ++ .../node_modules/depd/lib/browser/index.js | 79 + .../depd/lib/compat/buffer-concat.js | 35 + .../depd/lib/compat/callsite-tostring.js | 103 + .../depd/lib/compat/event-listener-count.js | 22 + .../node_modules/depd/lib/compat/index.js | 84 + Server File/node_modules/depd/package.json | 103 + Server File/node_modules/destroy/LICENSE | 22 + Server File/node_modules/destroy/README.md | 60 + Server File/node_modules/destroy/index.js | 75 + Server File/node_modules/destroy/package.json | 106 + Server File/node_modules/ee-first/LICENSE | 22 + Server File/node_modules/ee-first/README.md | 80 + Server File/node_modules/ee-first/index.js | 95 + .../node_modules/ee-first/package.json | 98 + Server File/node_modules/encodeurl/HISTORY.md | 9 + Server File/node_modules/encodeurl/LICENSE | 22 + Server File/node_modules/encodeurl/README.md | 124 + Server File/node_modules/encodeurl/index.js | 60 + .../node_modules/encodeurl/package.json | 112 + .../node_modules/engine.io-client/History.md | 683 ++ .../node_modules/engine.io-client/LICENSE | 22 + .../node_modules/engine.io-client/README.md | 299 + .../engine.io-client/engine.io.js | 4707 ++++++++++++ .../node_modules/engine.io-client/index.js | 2 + .../engine.io-client/lib/index.js | 10 + .../engine.io-client/lib/socket.js | 744 ++ .../engine.io-client/lib/transport.js | 157 + .../engine.io-client/lib/transports/index.js | 53 + .../lib/transports/polling-jsonp.js | 231 + .../lib/transports/polling-xhr.js | 413 + .../lib/transports/polling.js | 245 + .../lib/transports/websocket.js | 286 + .../engine.io-client/lib/xmlhttprequest.js | 37 + .../engine.io-client/package.json | 150 + .../node_modules/engine.io-parser/History.md | 177 + .../node_modules/engine.io-parser/LICENSE | 22 + .../node_modules/engine.io-parser/Readme.md | 202 + .../node_modules/engine.io-parser/index.js | 2 + .../engine.io-parser/lib/browser.js | 606 ++ .../engine.io-parser/lib/index.js | 480 ++ .../node_modules/engine.io-parser/lib/keys.js | 19 + .../node_modules/engine.io-parser/lib/utf8.js | 255 + .../engine.io-parser/package.json | 101 + Server File/node_modules/engine.io/History.md | 608 ++ Server File/node_modules/engine.io/LICENSE | 19 + Server File/node_modules/engine.io/README.md | 539 ++ Server File/node_modules/engine.io/index.js | 4 + .../node_modules/engine.io/lib/engine.io.js | 126 + .../node_modules/engine.io/lib/server.js | 518 ++ .../node_modules/engine.io/lib/socket.js | 483 ++ .../node_modules/engine.io/lib/transport.js | 128 + .../engine.io/lib/transports/index.js | 36 + .../engine.io/lib/transports/polling-jsonp.js | 75 + .../engine.io/lib/transports/polling-xhr.js | 69 + .../engine.io/lib/transports/polling.js | 408 + .../engine.io/lib/transports/websocket.js | 134 + .../node_modules/engine.io/package.json | 135 + Server File/node_modules/escape-html/LICENSE | 24 + .../node_modules/escape-html/Readme.md | 43 + Server File/node_modules/escape-html/index.js | 78 + .../node_modules/escape-html/package.json | 94 + Server File/node_modules/etag/HISTORY.md | 78 + Server File/node_modules/etag/LICENSE | 22 + Server File/node_modules/etag/README.md | 159 + Server File/node_modules/etag/index.js | 132 + Server File/node_modules/etag/package.json | 119 + Server File/node_modules/express/History.md | 3270 ++++++++ Server File/node_modules/express/LICENSE | 24 + Server File/node_modules/express/Readme.md | 141 + Server File/node_modules/express/index.js | 11 + .../node_modules/express/lib/application.js | 644 ++ .../node_modules/express/lib/express.js | 111 + .../express/lib/middleware/init.js | 43 + .../express/lib/middleware/query.js | 46 + .../node_modules/express/lib/request.js | 517 ++ .../node_modules/express/lib/response.js | 1076 +++ .../node_modules/express/lib/router/index.js | 662 ++ .../node_modules/express/lib/router/layer.js | 181 + .../node_modules/express/lib/router/route.js | 216 + Server File/node_modules/express/lib/utils.js | 299 + Server File/node_modules/express/lib/view.js | 175 + Server File/node_modules/express/package.json | 197 + .../node_modules/finalhandler/HISTORY.md | 150 + Server File/node_modules/finalhandler/LICENSE | 22 + .../node_modules/finalhandler/README.md | 146 + .../node_modules/finalhandler/index.js | 300 + .../node_modules/finalhandler/package.json | 115 + Server File/node_modules/forwarded/HISTORY.md | 4 + Server File/node_modules/forwarded/LICENSE | 22 + Server File/node_modules/forwarded/README.md | 53 + Server File/node_modules/forwarded/index.js | 35 + .../node_modules/forwarded/package.json | 99 + Server File/node_modules/fresh/HISTORY.md | 58 + Server File/node_modules/fresh/LICENSE | 23 + Server File/node_modules/fresh/README.md | 113 + Server File/node_modules/fresh/index.js | 81 + Server File/node_modules/fresh/package.json | 120 + .../node_modules/has-binary2/History.md | 39 + Server File/node_modules/has-binary2/LICENSE | 20 + .../node_modules/has-binary2/README.md | 4 + Server File/node_modules/has-binary2/index.js | 62 + .../node_modules/isarray/README.md | 54 + .../has-binary2/node_modules/isarray/index.js | 5 + .../node_modules/isarray/package.json | 111 + .../node_modules/has-binary2/package.json | 85 + Server File/node_modules/has-cors/.npmignore | 3 + Server File/node_modules/has-cors/History.md | 21 + Server File/node_modules/has-cors/Makefile | 11 + Server File/node_modules/has-cors/Readme.md | 24 + .../node_modules/has-cors/component.json | 13 + Server File/node_modules/has-cors/index.js | 17 + .../node_modules/has-cors/package.json | 97 + Server File/node_modules/has-cors/test.js | 24 + .../node_modules/http-errors/HISTORY.md | 118 + Server File/node_modules/http-errors/LICENSE | 23 + .../node_modules/http-errors/README.md | 135 + Server File/node_modules/http-errors/index.js | 260 + .../node_modules/http-errors/package.json | 131 + Server File/node_modules/indexof/.npmignore | 2 + Server File/node_modules/indexof/Makefile | 11 + Server File/node_modules/indexof/Readme.md | 15 + .../node_modules/indexof/component.json | 10 + Server File/node_modules/indexof/index.js | 10 + Server File/node_modules/indexof/package.json | 67 + Server File/node_modules/inherits/LICENSE | 16 + Server File/node_modules/inherits/README.md | 42 + Server File/node_modules/inherits/inherits.js | 7 + .../node_modules/inherits/inherits_browser.js | 23 + .../node_modules/inherits/package.json | 98 + Server File/node_modules/ipaddr.js/.npmignore | 2 + .../node_modules/ipaddr.js/.travis.yml | 10 + Server File/node_modules/ipaddr.js/Cakefile | 18 + Server File/node_modules/ipaddr.js/LICENSE | 19 + Server File/node_modules/ipaddr.js/README.md | 211 + Server File/node_modules/ipaddr.js/bower.json | 29 + .../node_modules/ipaddr.js/ipaddr.min.js | 1 + .../node_modules/ipaddr.js/lib/ipaddr.js | 535 ++ .../node_modules/ipaddr.js/package.json | 97 + .../node_modules/ipaddr.js/src/ipaddr.coffee | 460 ++ .../ipaddr.js/test/ipaddr.test.coffee | 346 + Server File/node_modules/isarray/README.md | 54 + .../node_modules/isarray/build/build.js | 209 + .../node_modules/isarray/component.json | 19 + Server File/node_modules/isarray/index.js | 3 + Server File/node_modules/isarray/package.json | 86 + .../node_modules/media-typer/HISTORY.md | 22 + Server File/node_modules/media-typer/LICENSE | 22 + .../node_modules/media-typer/README.md | 81 + Server File/node_modules/media-typer/index.js | 270 + .../node_modules/media-typer/package.json | 92 + .../node_modules/merge-descriptors/HISTORY.md | 21 + .../node_modules/merge-descriptors/LICENSE | 23 + .../node_modules/merge-descriptors/README.md | 48 + .../node_modules/merge-descriptors/index.js | 60 + .../merge-descriptors/package.json | 172 + Server File/node_modules/methods/HISTORY.md | 29 + Server File/node_modules/methods/LICENSE | 24 + Server File/node_modules/methods/README.md | 51 + Server File/node_modules/methods/index.js | 69 + Server File/node_modules/methods/package.json | 122 + Server File/node_modules/mime-db/HISTORY.md | 412 + Server File/node_modules/mime-db/LICENSE | 22 + Server File/node_modules/mime-db/README.md | 82 + Server File/node_modules/mime-db/db.json | 6805 +++++++++++++++++ Server File/node_modules/mime-db/index.js | 11 + Server File/node_modules/mime-db/package.json | 138 + .../node_modules/mime-types/HISTORY.md | 223 + Server File/node_modules/mime-types/LICENSE | 23 + Server File/node_modules/mime-types/README.md | 108 + Server File/node_modules/mime-types/index.js | 188 + .../node_modules/mime-types/package.json | 128 + Server File/node_modules/mime/.npmignore | 0 Server File/node_modules/mime/LICENSE | 19 + Server File/node_modules/mime/README.md | 90 + Server File/node_modules/mime/build/build.js | 11 + Server File/node_modules/mime/build/test.js | 57 + Server File/node_modules/mime/cli.js | 8 + Server File/node_modules/mime/mime.js | 108 + Server File/node_modules/mime/package.json | 106 + Server File/node_modules/mime/types.json | 1 + Server File/node_modules/ms/index.js | 152 + Server File/node_modules/ms/license.md | 21 + Server File/node_modules/ms/package.json | 110 + Server File/node_modules/ms/readme.md | 51 + Server File/node_modules/mysql/Changes.md | 492 ++ Server File/node_modules/mysql/License | 19 + Server File/node_modules/mysql/Readme.md | 1435 ++++ Server File/node_modules/mysql/index.js | 149 + .../node_modules/mysql/lib/Connection.js | 463 ++ .../mysql/lib/ConnectionConfig.js | 201 + Server File/node_modules/mysql/lib/Pool.js | 294 + .../node_modules/mysql/lib/PoolCluster.js | 288 + .../node_modules/mysql/lib/PoolConfig.js | 32 + .../node_modules/mysql/lib/PoolConnection.js | 64 + .../node_modules/mysql/lib/PoolNamespace.js | 136 + .../node_modules/mysql/lib/PoolSelector.js | 31 + .../node_modules/mysql/lib/protocol/Auth.js | 152 + .../mysql/lib/protocol/BufferList.js | 25 + .../mysql/lib/protocol/PacketHeader.js | 5 + .../mysql/lib/protocol/PacketWriter.js | 210 + .../node_modules/mysql/lib/protocol/Parser.js | 470 ++ .../mysql/lib/protocol/Protocol.js | 455 ++ .../mysql/lib/protocol/ResultSet.js | 7 + .../mysql/lib/protocol/SqlString.js | 1 + .../mysql/lib/protocol/constants/charsets.js | 262 + .../mysql/lib/protocol/constants/client.js | 26 + .../mysql/lib/protocol/constants/errors.js | 2398 ++++++ .../lib/protocol/constants/field_flags.js | 18 + .../lib/protocol/constants/server_status.js | 39 + .../lib/protocol/constants/ssl_profiles.js | 444 ++ .../mysql/lib/protocol/constants/types.js | 33 + .../packets/ClientAuthenticationPacket.js | 52 + .../protocol/packets/ComChangeUserPacket.js | 26 + .../lib/protocol/packets/ComPingPacket.js | 12 + .../lib/protocol/packets/ComQueryPacket.js | 15 + .../lib/protocol/packets/ComQuitPacket.js | 12 + .../protocol/packets/ComStatisticsPacket.js | 12 + .../mysql/lib/protocol/packets/EmptyPacket.js | 6 + .../mysql/lib/protocol/packets/EofPacket.js | 25 + .../mysql/lib/protocol/packets/ErrorPacket.js | 35 + .../mysql/lib/protocol/packets/Field.js | 34 + .../mysql/lib/protocol/packets/FieldPacket.js | 93 + .../packets/HandshakeInitializationPacket.js | 100 + .../protocol/packets/LocalDataFilePacket.js | 15 + .../mysql/lib/protocol/packets/OkPacket.js | 41 + .../lib/protocol/packets/OldPasswordPacket.js | 15 + .../protocol/packets/ResultSetHeaderPacket.js | 25 + .../lib/protocol/packets/RowDataPacket.js | 133 + .../lib/protocol/packets/SSLRequestPacket.js | 27 + .../lib/protocol/packets/StatisticsPacket.js | 20 + .../protocol/packets/UseOldPasswordPacket.js | 14 + .../mysql/lib/protocol/packets/index.js | 20 + .../lib/protocol/sequences/ChangeUser.js | 41 + .../mysql/lib/protocol/sequences/Handshake.js | 106 + .../mysql/lib/protocol/sequences/Ping.js | 19 + .../mysql/lib/protocol/sequences/Query.js | 216 + .../mysql/lib/protocol/sequences/Quit.js | 18 + .../mysql/lib/protocol/sequences/Sequence.js | 128 + .../lib/protocol/sequences/Statistics.js | 30 + .../mysql/lib/protocol/sequences/index.js | 7 + Server File/node_modules/mysql/package.json | 142 + .../node_modules/negotiator/HISTORY.md | 98 + Server File/node_modules/negotiator/LICENSE | 24 + Server File/node_modules/negotiator/README.md | 203 + Server File/node_modules/negotiator/index.js | 124 + .../node_modules/negotiator/lib/charset.js | 169 + .../node_modules/negotiator/lib/encoding.js | 184 + .../node_modules/negotiator/lib/language.js | 179 + .../node_modules/negotiator/lib/mediaType.js | 294 + .../node_modules/negotiator/package.json | 125 + .../node_modules/object-assign/index.js | 90 + .../node_modules/object-assign/license | 21 + .../node_modules/object-assign/package.json | 118 + .../node_modules/object-assign/readme.md | 61 + .../node_modules/object-component/.npmignore | 3 + .../node_modules/object-component/History.md | 10 + .../node_modules/object-component/Makefile | 16 + .../node_modules/object-component/Readme.md | 31 + .../object-component/component.json | 10 + .../node_modules/object-component/index.js | 84 + .../object-component/package.json | 69 + .../object-component/test/object.js | 48 + .../node_modules/on-finished/HISTORY.md | 88 + Server File/node_modules/on-finished/LICENSE | 23 + .../node_modules/on-finished/README.md | 154 + Server File/node_modules/on-finished/index.js | 196 + .../node_modules/on-finished/package.json | 106 + Server File/node_modules/parsejson/.npmignore | 2 + Server File/node_modules/parsejson/LICENSE | 21 + Server File/node_modules/parsejson/Makefile | 3 + Server File/node_modules/parsejson/README.md | 2 + Server File/node_modules/parsejson/index.js | 32 + .../node_modules/parsejson/package.json | 87 + Server File/node_modules/parsejson/test.js | 21 + Server File/node_modules/parseqs/.npmignore | 3 + Server File/node_modules/parseqs/LICENSE | 21 + Server File/node_modules/parseqs/Makefile | 3 + Server File/node_modules/parseqs/README.md | 1 + Server File/node_modules/parseqs/index.js | 37 + Server File/node_modules/parseqs/package.json | 88 + Server File/node_modules/parseqs/test.js | 27 + Server File/node_modules/parseuri/.npmignore | 2 + Server File/node_modules/parseuri/History.md | 5 + Server File/node_modules/parseuri/LICENSE | 21 + Server File/node_modules/parseuri/Makefile | 3 + Server File/node_modules/parseuri/README.md | 2 + Server File/node_modules/parseuri/index.js | 39 + .../node_modules/parseuri/package.json | 86 + Server File/node_modules/parseuri/test.js | 51 + Server File/node_modules/parseurl/HISTORY.md | 47 + Server File/node_modules/parseurl/LICENSE | 24 + Server File/node_modules/parseurl/README.md | 120 + Server File/node_modules/parseurl/index.js | 138 + .../node_modules/parseurl/package.json | 125 + .../node_modules/path-to-regexp/History.md | 36 + .../node_modules/path-to-regexp/LICENSE | 21 + .../node_modules/path-to-regexp/Readme.md | 35 + .../node_modules/path-to-regexp/index.js | 129 + .../node_modules/path-to-regexp/package.json | 219 + .../node_modules/proxy-addr/HISTORY.md | 109 + Server File/node_modules/proxy-addr/LICENSE | 22 + Server File/node_modules/proxy-addr/README.md | 140 + Server File/node_modules/proxy-addr/index.js | 325 + .../node_modules/proxy-addr/package.json | 108 + Server File/node_modules/qs/.eslintignore | 1 + Server File/node_modules/qs/.eslintrc | 18 + Server File/node_modules/qs/.jscs.json | 176 + Server File/node_modules/qs/CHANGELOG.md | 175 + Server File/node_modules/qs/LICENSE | 28 + Server File/node_modules/qs/README.md | 440 ++ Server File/node_modules/qs/dist/qs.js | 597 ++ Server File/node_modules/qs/lib/formats.js | 18 + Server File/node_modules/qs/lib/index.js | 11 + Server File/node_modules/qs/lib/parse.js | 167 + Server File/node_modules/qs/lib/stringify.js | 207 + Server File/node_modules/qs/lib/utils.js | 182 + Server File/node_modules/qs/package.json | 121 + Server File/node_modules/qs/test/.eslintrc | 11 + Server File/node_modules/qs/test/index.js | 7 + Server File/node_modules/qs/test/parse.js | 519 ++ Server File/node_modules/qs/test/stringify.js | 567 ++ Server File/node_modules/qs/test/utils.js | 22 + .../node_modules/range-parser/HISTORY.md | 51 + Server File/node_modules/range-parser/LICENSE | 23 + .../node_modules/range-parser/README.md | 75 + .../node_modules/range-parser/index.js | 158 + .../node_modules/range-parser/package.json | 134 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../node_modules/readable-stream/float.patch | 923 +++ .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 951 +++ .../readable-stream/lib/_stream_transform.js | 209 + .../readable-stream/lib/_stream_writable.js | 477 ++ .../node_modules/readable-stream/package.json | 112 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 10 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node_modules/safe-buffer/.travis.yml | 7 + Server File/node_modules/safe-buffer/LICENSE | 21 + .../node_modules/safe-buffer/README.md | 581 ++ .../node_modules/safe-buffer/browser.js | 1 + Server File/node_modules/safe-buffer/index.js | 58 + .../node_modules/safe-buffer/package.json | 103 + Server File/node_modules/safe-buffer/test.js | 99 + Server File/node_modules/send/HISTORY.md | 411 + Server File/node_modules/send/LICENSE | 23 + Server File/node_modules/send/README.md | 301 + Server File/node_modules/send/index.js | 1074 +++ Server File/node_modules/send/package.json | 139 + .../node_modules/serve-static/HISTORY.md | 377 + Server File/node_modules/serve-static/LICENSE | 25 + .../node_modules/serve-static/README.md | 253 + .../node_modules/serve-static/index.js | 209 + .../node_modules/serve-static/package.json | 110 + .../node_modules/setprototypeof/LICENSE | 13 + .../node_modules/setprototypeof/README.md | 21 + .../node_modules/setprototypeof/index.js | 15 + .../node_modules/setprototypeof/package.json | 89 + .../node_modules/socket.io-adapter/.npmignore | 1 + .../node_modules/socket.io-adapter/History.md | 54 + .../node_modules/socket.io-adapter/LICENSE | 20 + .../node_modules/socket.io-adapter/Readme.md | 16 + .../node_modules/socket.io-adapter/index.js | 263 + .../node_modules/debug/.jshintrc | 3 + .../node_modules/debug/.npmignore | 7 + .../node_modules/debug/CHANGELOG.md | 235 + .../node_modules/debug/LICENSE | 19 + .../node_modules/debug/Makefile | 37 + .../node_modules/debug/Readme.md | 199 + .../node_modules/debug/bower.json | 29 + .../node_modules/debug/browser.js | 177 + .../node_modules/debug/component.json | 19 + .../node_modules/debug/debug.js | 200 + .../node_modules/debug/index.js | 10 + .../node_modules/debug/node.js | 213 + .../node_modules/debug/package.json | 122 + .../node_modules/ms/LICENSE.md | 21 + .../node_modules/ms/README.md | 52 + .../node_modules/ms/index.js | 149 + .../node_modules/ms/package.json | 108 + .../socket.io-adapter/package.json | 83 + .../node_modules/socket.io-client/History.md | 561 ++ .../node_modules/socket.io-client/LICENSE | 22 + .../node_modules/socket.io-client/README.md | 50 + .../socket.io-client/dist/socket.io.js | 3 + .../socket.io-client/dist/socket.io.js.map | 1 + .../socket.io-client/dist/socket.io.slim.js | 3 + .../dist/socket.io.slim.js.map | 1 + .../socket.io-client/lib/index.js | 94 + .../socket.io-client/lib/manager.js | 573 ++ .../node_modules/socket.io-client/lib/on.js | 24 + .../socket.io-client/lib/socket.js | 418 + .../node_modules/socket.io-client/lib/url.js | 75 + .../socket.io-client/package.json | 154 + .../node_modules/socket.io-parser/History.md | 160 + .../node_modules/socket.io-parser/LICENSE | 20 + .../node_modules/socket.io-parser/Readme.md | 73 + .../node_modules/socket.io-parser/binary.js | 141 + .../node_modules/socket.io-parser/index.js | 400 + .../socket.io-parser/is-buffer.js | 13 + .../node_modules/isarray/README.md | 54 + .../node_modules/isarray/index.js | 5 + .../node_modules/isarray/package.json | 111 + .../socket.io-parser/package.json | 101 + Server File/node_modules/socket.io/History.md | 720 ++ Server File/node_modules/socket.io/LICENSE | 22 + Server File/node_modules/socket.io/Readme.md | 242 + .../node_modules/socket.io/lib/client.js | 252 + .../node_modules/socket.io/lib/index.js | 474 ++ .../node_modules/socket.io/lib/namespace.js | 274 + .../node_modules/socket.io/lib/socket.js | 558 ++ .../node_modules/socket.io/package.json | 134 + Server File/node_modules/sqlstring/HISTORY.md | 30 + Server File/node_modules/sqlstring/LICENSE | 19 + Server File/node_modules/sqlstring/README.md | 160 + Server File/node_modules/sqlstring/index.js | 1 + .../node_modules/sqlstring/lib/SqlString.js | 218 + .../node_modules/sqlstring/package.json | 132 + Server File/node_modules/statuses/HISTORY.md | 55 + Server File/node_modules/statuses/LICENSE | 23 + Server File/node_modules/statuses/README.md | 103 + Server File/node_modules/statuses/codes.json | 65 + Server File/node_modules/statuses/index.js | 110 + .../node_modules/statuses/package.json | 141 + .../node_modules/string_decoder/.npmignore | 2 + .../node_modules/string_decoder/LICENSE | 20 + .../node_modules/string_decoder/README.md | 7 + .../node_modules/string_decoder/index.js | 221 + .../node_modules/string_decoder/package.json | 87 + Server File/node_modules/to-array/.npmignore | 3 + Server File/node_modules/to-array/LICENCE | 19 + Server File/node_modules/to-array/README.md | 22 + Server File/node_modules/to-array/index.js | 13 + .../node_modules/to-array/package.json | 98 + Server File/node_modules/type-is/HISTORY.md | 218 + Server File/node_modules/type-is/LICENSE | 23 + Server File/node_modules/type-is/README.md | 146 + Server File/node_modules/type-is/index.js | 262 + Server File/node_modules/type-is/package.json | 121 + Server File/node_modules/ultron/LICENSE | 22 + Server File/node_modules/ultron/index.js | 138 + Server File/node_modules/ultron/package.json | 112 + Server File/node_modules/unpipe/HISTORY.md | 4 + Server File/node_modules/unpipe/LICENSE | 22 + Server File/node_modules/unpipe/README.md | 43 + Server File/node_modules/unpipe/index.js | 69 + Server File/node_modules/unpipe/package.json | 93 + .../node_modules/utils-merge/.travis.yml | 6 + Server File/node_modules/utils-merge/LICENSE | 20 + .../node_modules/utils-merge/README.md | 34 + Server File/node_modules/utils-merge/index.js | 23 + .../node_modules/utils-merge/package.json | 93 + Server File/node_modules/uws/LICENSE | 17 + Server File/node_modules/uws/README.md | 32 + Server File/node_modules/uws/binding.gyp | 80 + Server File/node_modules/uws/build_log.txt | 21 + Server File/node_modules/uws/package.json | 91 + Server File/node_modules/uws/src/Asio.h | 184 + Server File/node_modules/uws/src/Backend.h | 15 + Server File/node_modules/uws/src/Epoll.cpp | 60 + Server File/node_modules/uws/src/Epoll.h | 257 + .../node_modules/uws/src/Extensions.cpp | 131 + Server File/node_modules/uws/src/Extensions.h | 29 + Server File/node_modules/uws/src/Group.cpp | 263 + Server File/node_modules/uws/src/Group.h | 144 + .../node_modules/uws/src/HTTPSocket.cpp | 310 + Server File/node_modules/uws/src/HTTPSocket.h | 285 + Server File/node_modules/uws/src/Hub.cpp | 177 + Server File/node_modules/uws/src/Hub.h | 97 + Server File/node_modules/uws/src/Libuv.h | 175 + .../node_modules/uws/src/Networking.cpp | 78 + Server File/node_modules/uws/src/Networking.h | 259 + Server File/node_modules/uws/src/Node.cpp | 83 + Server File/node_modules/uws/src/Node.h | 198 + Server File/node_modules/uws/src/Socket.cpp | 28 + Server File/node_modules/uws/src/Socket.h | 507 ++ .../node_modules/uws/src/WebSocket.cpp | 405 + Server File/node_modules/uws/src/WebSocket.h | 89 + .../node_modules/uws/src/WebSocketProtocol.h | 377 + Server File/node_modules/uws/src/addon.cpp | 24 + Server File/node_modules/uws/src/addon.h | 464 ++ Server File/node_modules/uws/src/http.h | 357 + Server File/node_modules/uws/src/uWS.h | 6 + Server File/node_modules/uws/uws.js | 563 ++ .../node_modules/uws/uws_darwin_46.node | Bin 0 -> 377568 bytes .../node_modules/uws/uws_darwin_47.node | Bin 0 -> 377568 bytes .../node_modules/uws/uws_darwin_48.node | Bin 0 -> 377560 bytes .../node_modules/uws/uws_darwin_51.node | Bin 0 -> 377616 bytes .../node_modules/uws/uws_linux_46.node | Bin 0 -> 1563976 bytes .../node_modules/uws/uws_linux_47.node | Bin 0 -> 1563976 bytes .../node_modules/uws/uws_linux_48.node | Bin 0 -> 1563976 bytes .../node_modules/uws/uws_linux_51.node | Bin 0 -> 1563976 bytes .../node_modules/uws/uws_win32_48.node | Bin 0 -> 641024 bytes .../node_modules/uws/uws_win32_51.node | Bin 0 -> 641536 bytes Server File/node_modules/vary/HISTORY.md | 34 + Server File/node_modules/vary/LICENSE | 22 + Server File/node_modules/vary/README.md | 101 + Server File/node_modules/vary/index.js | 131 + Server File/node_modules/vary/package.json | 109 + Server File/node_modules/ws/LICENSE | 21 + Server File/node_modules/ws/README.md | 260 + Server File/node_modules/ws/index.js | 15 + Server File/node_modules/ws/lib/BufferUtil.js | 71 + Server File/node_modules/ws/lib/Constants.js | 10 + Server File/node_modules/ws/lib/ErrorCodes.js | 28 + .../node_modules/ws/lib/EventTarget.js | 155 + Server File/node_modules/ws/lib/Extensions.js | 67 + .../node_modules/ws/lib/PerMessageDeflate.js | 384 + Server File/node_modules/ws/lib/Receiver.js | 555 ++ Server File/node_modules/ws/lib/Sender.js | 403 + Server File/node_modules/ws/lib/Validation.js | 17 + Server File/node_modules/ws/lib/WebSocket.js | 712 ++ .../node_modules/ws/lib/WebSocketServer.js | 336 + Server File/node_modules/ws/package.json | 127 + .../node_modules/xmlhttprequest-ssl/LICENSE | 22 + .../node_modules/xmlhttprequest-ssl/README.md | 61 + .../xmlhttprequest-ssl/autotest.watchr | 8 + .../xmlhttprequest-ssl/example/demo.js | 16 + .../xmlhttprequest-ssl/lib/XMLHttpRequest.js | 650 ++ .../xmlhttprequest-ssl/package.json | 98 + .../tests/test-constants.js | 13 + .../xmlhttprequest-ssl/tests/test-events.js | 50 + .../tests/test-exceptions.js | 59 + .../xmlhttprequest-ssl/tests/test-headers.js | 76 + .../tests/test-redirect-302.js | 41 + .../tests/test-redirect-303.js | 41 + .../tests/test-redirect-307.js | 43 + .../tests/test-request-methods.js | 62 + .../tests/test-request-protocols.js | 32 + .../xmlhttprequest-ssl/tests/testdata.txt | 1 + Server File/node_modules/yeast/LICENSE | 22 + Server File/node_modules/yeast/README.md | 82 + Server File/node_modules/yeast/index.js | 68 + Server File/node_modules/yeast/package.json | 100 + Server File/package.json | 23 + Server File/test.js | 89 + app/.gitignore | 1 + app/build.gradle | 30 + app/proguard-rules.pro | 25 + .../video_player/ExampleInstrumentedTest.java | 26 + app/src/main/AndroidManifest.xml | 23 + .../tejas/video_player/MainActivity.java | 84 + app/src/main/res/layout/activity_main.xml | 28 + app/src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3418 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 4208 bytes app/src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2206 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2555 bytes app/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4842 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 6114 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 7718 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10056 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 10486 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 14696 bytes app/src/main/res/raw/aaa.mp4 | Bin 0 -> 9043592 bytes app/src/main/res/raw/aaa/mp4 | 0 app/src/main/res/values/colors.xml | 6 + app/src/main/res/values/strings.xml | 3 + app/src/main/res/values/styles.xml | 11 + .../tejas/video_player/ExampleUnitTest.java | 17 + build.gradle | 23 + gradle.properties | 17 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53636 bytes gradle/wrapper/gradle-wrapper.properties | 6 + gradlew | 160 + gradlew.bat | 90 + settings.gradle | 1 + 1063 files changed, 119631 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.name create mode 100644 .idea/compiler.xml create mode 100644 .idea/copyright/profiles_settings.xml create mode 100644 .idea/gradle.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/runConfigurations.xml create mode 100644 JUNK/639486063 Automatic Bulldoze v2/AutomaticBulldozeV2.dll create mode 100644 JUNK/OO/.gitignore create mode 100644 JUNK/OO/.idea/compiler.xml create mode 100644 JUNK/OO/.idea/copyright/profiles_settings.xml create mode 100644 JUNK/OO/.idea/gradle.xml create mode 100644 JUNK/OO/.idea/misc.xml create mode 100644 JUNK/OO/.idea/modules.xml create mode 100644 JUNK/OO/.idea/runConfigurations.xml create mode 100644 JUNK/OO/app/.gitignore create mode 100644 JUNK/OO/app/build.gradle create mode 100644 JUNK/OO/app/proguard-rules.pro create mode 100644 JUNK/OO/app/src/androidTest/java/com/example/tejas/oo/ExampleInstrumentedTest.java create mode 100644 JUNK/OO/app/src/main/AndroidManifest.xml create mode 100644 JUNK/OO/app/src/main/java/com/example/tejas/oo/MainActivity.java create mode 100644 JUNK/OO/app/src/main/res/layout/activity_main.xml create mode 100644 JUNK/OO/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 JUNK/OO/app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 JUNK/OO/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 JUNK/OO/app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 JUNK/OO/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 JUNK/OO/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 JUNK/OO/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 JUNK/OO/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 JUNK/OO/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 JUNK/OO/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 JUNK/OO/app/src/main/res/values/colors.xml create mode 100644 JUNK/OO/app/src/main/res/values/strings.xml create mode 100644 JUNK/OO/app/src/main/res/values/styles.xml create mode 100644 JUNK/OO/app/src/test/java/com/example/tejas/oo/ExampleUnitTest.java create mode 100644 JUNK/OO/build.gradle create mode 100644 JUNK/OO/gradle.properties create mode 100644 JUNK/OO/gradle/wrapper/gradle-wrapper.jar create mode 100644 JUNK/OO/gradle/wrapper/gradle-wrapper.properties create mode 100644 JUNK/OO/gradlew create mode 100644 JUNK/OO/gradlew.bat create mode 100644 JUNK/OO/settings.gradle create mode 100644 JUNK/SocketIO/.gitignore create mode 100644 JUNK/SocketIO/.idea/compiler.xml create mode 100644 JUNK/SocketIO/.idea/copyright/profiles_settings.xml create mode 100644 JUNK/SocketIO/.idea/gradle.xml create mode 100644 JUNK/SocketIO/.idea/misc.xml create mode 100644 JUNK/SocketIO/.idea/modules.xml create mode 100644 JUNK/SocketIO/.idea/runConfigurations.xml create mode 100644 JUNK/SocketIO/app/.gitignore create mode 100644 JUNK/SocketIO/app/build.gradle create mode 100644 JUNK/SocketIO/app/proguard-rules.pro create mode 100644 JUNK/SocketIO/app/src/androidTest/java/com/example/tejas/socketio/ExampleInstrumentedTest.java create mode 100644 JUNK/SocketIO/app/src/main/AndroidManifest.xml create mode 100644 JUNK/SocketIO/app/src/main/java/com/example/tejas/socketio/MainActivity.java create mode 100644 JUNK/SocketIO/app/src/main/java/com/example/tejas/socketio/test.java create mode 100644 JUNK/SocketIO/app/src/main/res/layout/activity_main.xml create mode 100644 JUNK/SocketIO/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 JUNK/SocketIO/app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 JUNK/SocketIO/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 JUNK/SocketIO/app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 JUNK/SocketIO/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 JUNK/SocketIO/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 JUNK/SocketIO/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 JUNK/SocketIO/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 JUNK/SocketIO/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 JUNK/SocketIO/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 JUNK/SocketIO/app/src/main/res/values/colors.xml create mode 100644 JUNK/SocketIO/app/src/main/res/values/strings.xml create mode 100644 JUNK/SocketIO/app/src/main/res/values/styles.xml create mode 100644 JUNK/SocketIO/app/src/test/java/com/example/tejas/socketio/ExampleUnitTest.java create mode 100644 JUNK/SocketIO/build.gradle create mode 100644 JUNK/SocketIO/gradle.properties create mode 100644 JUNK/SocketIO/gradle/wrapper/gradle-wrapper.jar create mode 100644 JUNK/SocketIO/gradle/wrapper/gradle-wrapper.properties create mode 100644 JUNK/SocketIO/gradlew create mode 100644 JUNK/SocketIO/gradlew.bat create mode 100644 JUNK/SocketIO/settings.gradle create mode 100644 JUNK/WebSocket-for-Python-master/.gitignore create mode 100644 JUNK/WebSocket-for-Python-master/.travis.yml create mode 100644 JUNK/WebSocket-for-Python-master/CHANGELOG.md create mode 100644 JUNK/WebSocket-for-Python-master/LICENSE create mode 100644 JUNK/WebSocket-for-Python-master/MANIFEST.in create mode 100644 JUNK/WebSocket-for-Python-master/README.md create mode 100644 JUNK/WebSocket-for-Python-master/docs/Makefile create mode 100644 JUNK/WebSocket-for-Python-master/docs/conf.py create mode 100644 JUNK/WebSocket-for-Python-master/docs/index.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/make.bat create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/basics.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/browser.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/clienttutorial.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/conformance.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/credits.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/examples.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/install.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/maintainer/design.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/maintainer/documenting.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/maintainer/releasing.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/maintainer/rules.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/maintainer/testing.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/managertutorial.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/performance.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/requirements.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/servertutorial.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/ws4py.client.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/ws4py.rst create mode 100644 JUNK/WebSocket-for-Python-master/docs/sources/ws4py.server.rst create mode 100644 JUNK/WebSocket-for-Python-master/example/basic/app.py create mode 100644 JUNK/WebSocket-for-Python-master/example/basic/index.html create mode 100644 JUNK/WebSocket-for-Python-master/example/bug167_client.py create mode 100644 JUNK/WebSocket-for-Python-master/example/droid_sensor.py create mode 100644 JUNK/WebSocket-for-Python-master/example/droid_sensor_cherrypy_server.py create mode 100644 JUNK/WebSocket-for-Python-master/example/echo_chaussette_server.py create mode 100644 JUNK/WebSocket-for-Python-master/example/echo_cherrypy_server.py create mode 100644 JUNK/WebSocket-for-Python-master/example/echo_cherrypy_server_nojquery.py create mode 100644 JUNK/WebSocket-for-Python-master/example/echo_client.py create mode 100644 JUNK/WebSocket-for-Python-master/example/echo_gevent_client.py create mode 100644 JUNK/WebSocket-for-Python-master/example/echo_gevent_server.py create mode 100644 JUNK/WebSocket-for-Python-master/example/mocking_data_source.py create mode 100644 JUNK/WebSocket-for-Python-master/example/server.crt create mode 100644 JUNK/WebSocket-for-Python-master/example/server.key create mode 100644 JUNK/WebSocket-for-Python-master/example/static/css/style.css create mode 100644 JUNK/WebSocket-for-Python-master/example/static/js/droidsensor.js create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/app.py create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/css/style.css create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/css/style.min.css create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/js/drawingboard.js create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/js/drawingboard.min.js create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/robots.txt create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/initializr/apple-touch-icon-precomposed.png create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/initializr/css/main.css create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/initializr/css/main.min.css create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/initializr/css/normalize.css create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/initializr/css/normalize.min.css create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/initializr/favicon.ico create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/initializr/js/main.js create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/initializr/js/plugins.js create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/initializr/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/jcanvas/jcanvas.min.js create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/templates/.cache/board.html.py create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/templates/.cache/index.html.py create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/templates/404.html create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/templates/board.html create mode 100644 JUNK/WebSocket-for-Python-master/example/websensors/templates/index.html create mode 100644 JUNK/WebSocket-for-Python-master/requirements/py2kreqs.txt create mode 100644 JUNK/WebSocket-for-Python-master/requirements/py3kreqs.txt create mode 100644 JUNK/WebSocket-for-Python-master/requirements/rtd.txt create mode 100644 JUNK/WebSocket-for-Python-master/setup.py create mode 100644 JUNK/WebSocket-for-Python-master/test/__init__.py create mode 100644 JUNK/WebSocket-for-Python-master/test/autobahn_test_servers.py create mode 100644 JUNK/WebSocket-for-Python-master/test/fuzzingclient.json create mode 100644 JUNK/WebSocket-for-Python-master/test/test_cherrypy.py create mode 100644 JUNK/WebSocket-for-Python-master/test/test_client.py create mode 100644 JUNK/WebSocket-for-Python-master/test/test_frame.py create mode 100644 JUNK/WebSocket-for-Python-master/test/test_logger.py create mode 100644 JUNK/WebSocket-for-Python-master/test/test_manager.py create mode 100644 JUNK/WebSocket-for-Python-master/test/test_messaging.py create mode 100644 JUNK/WebSocket-for-Python-master/test/test_stream.py create mode 100644 JUNK/WebSocket-for-Python-master/test/test_utils.py create mode 100644 JUNK/WebSocket-for-Python-master/test/test_websocket.py create mode 100644 JUNK/WebSocket-for-Python-master/tox.ini create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/LICENSE create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/__init__.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/async_websocket.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/client/__init__.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/client/geventclient.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/client/threadedclient.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/client/tornadoclient.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/compat.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/exc.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/framing.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/manager.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/messaging.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/server/__init__.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/server/cherrypyserver.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/server/geventserver.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/server/tulipserver.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/server/wsgirefserver.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/server/wsgiutils.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/streaming.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/utf8validator.py create mode 100644 JUNK/WebSocket-for-Python-master/ws4py/websocket.py create mode 100644 JUNK/Websocket/.gitignore create mode 100644 JUNK/Websocket/.idea/compiler.xml create mode 100644 JUNK/Websocket/.idea/copyright/profiles_settings.xml create mode 100644 JUNK/Websocket/.idea/gradle.xml create mode 100644 JUNK/Websocket/.idea/inspectionProfiles/Project_Default.xml create mode 100644 JUNK/Websocket/.idea/inspectionProfiles/profiles_settings.xml create mode 100644 JUNK/Websocket/.idea/misc.xml create mode 100644 JUNK/Websocket/.idea/modules.xml create mode 100644 JUNK/Websocket/.idea/runConfigurations.xml create mode 100644 JUNK/Websocket/app/.gitignore create mode 100644 JUNK/Websocket/app/build.gradle create mode 100644 JUNK/Websocket/app/proguard-rules.pro create mode 100644 JUNK/Websocket/app/src/androidTest/java/com/example/tejas/websocket/ExampleInstrumentedTest.java create mode 100644 JUNK/Websocket/app/src/main/AndroidManifest.xml create mode 100644 JUNK/Websocket/app/src/main/java/com/example/tejas/websocket/Client.java create mode 100644 JUNK/Websocket/app/src/main/java/com/example/tejas/websocket/MainActivity.java create mode 100644 JUNK/Websocket/app/src/main/res/layout/activity_main.xml create mode 100644 JUNK/Websocket/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 JUNK/Websocket/app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 JUNK/Websocket/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 JUNK/Websocket/app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 JUNK/Websocket/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 JUNK/Websocket/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 JUNK/Websocket/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 JUNK/Websocket/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 JUNK/Websocket/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 JUNK/Websocket/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 JUNK/Websocket/app/src/main/res/values/colors.xml create mode 100644 JUNK/Websocket/app/src/main/res/values/strings.xml create mode 100644 JUNK/Websocket/app/src/main/res/values/styles.xml create mode 100644 JUNK/Websocket/app/src/test/java/com/example/tejas/websocket/ExampleUnitTest.java create mode 100644 JUNK/Websocket/build.gradle create mode 100644 JUNK/Websocket/gradle.properties create mode 100644 JUNK/Websocket/gradle/wrapper/gradle-wrapper.jar create mode 100644 JUNK/Websocket/gradle/wrapper/gradle-wrapper.properties create mode 100644 JUNK/Websocket/gradlew create mode 100644 JUNK/Websocket/gradlew.bat create mode 100644 JUNK/Websocket/settings.gradle create mode 100644 JUNK/aaa/01 MOUSE MODE.cfg create mode 100644 JUNK/aaa/02 JOYPAD MODE.cfg create mode 100644 JUNK/aaa/03 KEYBOARD MODE.cfg create mode 100644 JUNK/aaa/Changes.txt create mode 100644 JUNK/aaa/HELP/01-MOUSE-MODE.png create mode 100644 JUNK/aaa/HELP/02-JOYPAD-MODE.png create mode 100644 JUNK/aaa/HELP/03-KEYBOARD-MODE.png create mode 100644 JUNK/aaa/IMAGES/01-MOUSE-MODE.png create mode 100644 JUNK/aaa/IMAGES/02-JOYPAD-MODE.png create mode 100644 JUNK/aaa/IMAGES/03-KEYBOARD-MODE.png create mode 100644 JUNK/aaa/IMAGES/MODE-CUSTOM.jpg create mode 100644 JUNK/aaa/IMAGES/MODE-PLAYSTATION.jpg create mode 100644 JUNK/aaa/IMAGES/MODE-XBOX.jpg create mode 100644 JUNK/aaa/IMAGES/SLOT-001.png create mode 100644 JUNK/aaa/IMAGES/SLOT-002.png create mode 100644 JUNK/aaa/IMAGES/SLOT-003.png create mode 100644 JUNK/aaa/IMAGES/SLOT-004.png create mode 100644 JUNK/aaa/IMAGES/SLOT-005.png create mode 100644 JUNK/aaa/IMAGES/SLOT-006.png create mode 100644 JUNK/aaa/IMAGES/SLOT-007.png create mode 100644 JUNK/aaa/IMAGES/SLOT-008.png create mode 100644 JUNK/aaa/IMAGES/SLOT-009.png create mode 100644 JUNK/aaa/IMAGES/SLOT-010.png create mode 100644 JUNK/aaa/IMAGES/TEMPLATE (PHOTOSHOP)/TEMPLATE.psd create mode 100644 JUNK/aaa/JoyToKey.exe create mode 100644 JUNK/aaa/JoyToKey.ini create mode 100644 JUNK/aaa/JoyToKey.log create mode 100644 JUNK/aaa/Readme.txt create mode 100644 JUNK/aaa/SLOT 001.cfg create mode 100644 JUNK/aaa/SLOT 002.cfg create mode 100644 JUNK/aaa/SLOT 003.cfg create mode 100644 JUNK/aaa/SLOT 004.cfg create mode 100644 JUNK/aaa/SLOT 005.cfg create mode 100644 JUNK/aaa/SLOT 006.cfg create mode 100644 JUNK/aaa/SLOT 007.cfg create mode 100644 JUNK/aaa/SLOT 008.cfg create mode 100644 JUNK/aaa/SLOT 009.cfg create mode 100644 JUNK/aaa/SLOT 010.cfg create mode 100644 JUNK/aaa/SOUNDS/01 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/02 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/03 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/04 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/05 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/06 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/07 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/08 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/09 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/10 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/11 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/12 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/13 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/14 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/15 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/16 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/17 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/18 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/19 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/20 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - BASIC CONTROLS (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - BASIC MODES (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - JOYPAD MODE (M).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - KEYBOARD MODE (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - MOUSE MODE (M).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - PC MODE (F IRELAND).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - PC MODE (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - PC MODE (M).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - PC MODES (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - PC SPECIAL MODES (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - PLAY MODE (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - PLAY MODE (M).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - PLAY MODES (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - PLAYSTATION MODE (F IRELAND).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - PLAYSTATION MODE (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - PLAYSTATION MODES (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - PLAYSTATION SPECIAL MODES (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - SLOTS 1-10 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - SLOTS 11-20 (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - TEXT ENTRY MODE (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - TOGGLE FULL SCREEN MODE (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - XBOX MODE (F IRELAND).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - XBOX MODE (M).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - XBOX MODES (F).mp3 create mode 100644 JUNK/aaa/SOUNDS/MODE - XBOX SPECIAL MODES (F).mp3 create mode 100644 JUNK/aaa/TEMPLATE - BASIC FPS GAME.cfg create mode 100644 JUNK/aaa/VistaAPI.dll create mode 100644 JUNK/chat-example-master/.gitignore create mode 100644 JUNK/chat-example-master/README.md create mode 100644 JUNK/chat-example-master/app.json create mode 100644 JUNK/chat-example-master/index.html create mode 100644 JUNK/chat-example-master/index.js create mode 100644 JUNK/chat-example-master/package.json create mode 100644 JUNK/socket.io-client-java-master/.gitignore create mode 100644 JUNK/socket.io-client-java-master/.travis.yml create mode 100644 JUNK/socket.io-client-java-master/History.md create mode 100644 JUNK/socket.io-client-java-master/LICENSE create mode 100644 JUNK/socket.io-client-java-master/README.md create mode 100644 JUNK/socket.io-client-java-master/pom.xml create mode 100644 JUNK/socket.io-client-java-master/src/main/java/io/socket/backo/Backoff.java create mode 100644 JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Ack.java create mode 100644 JUNK/socket.io-client-java-master/src/main/java/io/socket/client/IO.java create mode 100644 JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Manager.java create mode 100644 JUNK/socket.io-client-java-master/src/main/java/io/socket/client/On.java create mode 100644 JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Socket.java create mode 100644 JUNK/socket.io-client-java-master/src/main/java/io/socket/client/SocketIOException.java create mode 100644 JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Url.java create mode 100644 JUNK/socket.io-client-java-master/src/main/java/io/socket/hasbinary/HasBinary.java create mode 100644 JUNK/socket.io-client-java-master/src/main/java/io/socket/parser/Binary.java create mode 100644 JUNK/socket.io-client-java-master/src/main/java/io/socket/parser/Packet.java create mode 100644 JUNK/socket.io-client-java-master/src/main/java/io/socket/parser/Parser.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/backo/BackoffTest.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/client/Connection.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ConnectionTest.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ExecutionTest.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/client/SSLConnectionTest.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ServerConnectionNamespaceTest.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ServerConnectionTest.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/client/SocketTest.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/client/UrlTest.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/client/executions/Connection.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/client/executions/ConnectionFailure.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/client/executions/ImmediateClose.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/hasbinary/HasBinaryTest.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/parser/ByteArrayTest.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/parser/Helpers.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/parser/ParserTest.java create mode 100644 JUNK/socket.io-client-java-master/src/test/java/io/socket/util/Optional.java create mode 100644 JUNK/socket.io-client-java-master/src/test/resources/cert.pem create mode 100644 JUNK/socket.io-client-java-master/src/test/resources/key.pem create mode 100644 JUNK/socket.io-client-java-master/src/test/resources/keystore.jks create mode 100644 JUNK/socket.io-client-java-master/src/test/resources/logging.properties create mode 100644 JUNK/socket.io-client-java-master/src/test/resources/package.json create mode 100644 JUNK/socket.io-client-java-master/src/test/resources/server.js create mode 100644 Server File/index.html create mode 100644 Server File/node_modules/.bin/mime create mode 100644 Server File/node_modules/.bin/mime.cmd create mode 100644 Server File/node_modules/accepts/HISTORY.md create mode 100644 Server File/node_modules/accepts/LICENSE create mode 100644 Server File/node_modules/accepts/README.md create mode 100644 Server File/node_modules/accepts/index.js create mode 100644 Server File/node_modules/accepts/package.json create mode 100644 Server File/node_modules/after/.npmignore create mode 100644 Server File/node_modules/after/.travis.yml create mode 100644 Server File/node_modules/after/LICENCE create mode 100644 Server File/node_modules/after/README.md create mode 100644 Server File/node_modules/after/index.js create mode 100644 Server File/node_modules/after/package.json create mode 100644 Server File/node_modules/after/test/after-test.js create mode 100644 Server File/node_modules/array-flatten/LICENSE create mode 100644 Server File/node_modules/array-flatten/README.md create mode 100644 Server File/node_modules/array-flatten/array-flatten.js create mode 100644 Server File/node_modules/array-flatten/package.json create mode 100644 Server File/node_modules/arraybuffer.slice/.npmignore create mode 100644 Server File/node_modules/arraybuffer.slice/Makefile create mode 100644 Server File/node_modules/arraybuffer.slice/README.md create mode 100644 Server File/node_modules/arraybuffer.slice/index.js create mode 100644 Server File/node_modules/arraybuffer.slice/package.json create mode 100644 Server File/node_modules/arraybuffer.slice/test/slice-buffer.js create mode 100644 Server File/node_modules/backo2/.npmignore create mode 100644 Server File/node_modules/backo2/History.md create mode 100644 Server File/node_modules/backo2/Makefile create mode 100644 Server File/node_modules/backo2/Readme.md create mode 100644 Server File/node_modules/backo2/component.json create mode 100644 Server File/node_modules/backo2/index.js create mode 100644 Server File/node_modules/backo2/package.json create mode 100644 Server File/node_modules/backo2/test/index.js create mode 100644 Server File/node_modules/base64-arraybuffer/.npmignore create mode 100644 Server File/node_modules/base64-arraybuffer/.travis.yml create mode 100644 Server File/node_modules/base64-arraybuffer/LICENSE-MIT create mode 100644 Server File/node_modules/base64-arraybuffer/README.md create mode 100644 Server File/node_modules/base64-arraybuffer/lib/base64-arraybuffer.js create mode 100644 Server File/node_modules/base64-arraybuffer/package.json create mode 100644 Server File/node_modules/base64id/.npmignore create mode 100644 Server File/node_modules/base64id/LICENSE create mode 100644 Server File/node_modules/base64id/README.md create mode 100644 Server File/node_modules/base64id/lib/base64id.js create mode 100644 Server File/node_modules/base64id/package.json create mode 100644 Server File/node_modules/better-assert/.npmignore create mode 100644 Server File/node_modules/better-assert/History.md create mode 100644 Server File/node_modules/better-assert/Makefile create mode 100644 Server File/node_modules/better-assert/Readme.md create mode 100644 Server File/node_modules/better-assert/example.js create mode 100644 Server File/node_modules/better-assert/index.js create mode 100644 Server File/node_modules/better-assert/package.json create mode 100644 Server File/node_modules/bignumber.js/LICENCE create mode 100644 Server File/node_modules/bignumber.js/README.md create mode 100644 Server File/node_modules/bignumber.js/bignumber.js create mode 100644 Server File/node_modules/bignumber.js/bignumber.js.map create mode 100644 Server File/node_modules/bignumber.js/bignumber.min.js create mode 100644 Server File/node_modules/bignumber.js/bower.json create mode 100644 Server File/node_modules/bignumber.js/doc/API.html create mode 100644 Server File/node_modules/bignumber.js/package.json create mode 100644 Server File/node_modules/blob/.npmignore create mode 100644 Server File/node_modules/blob/.zuul.yml create mode 100644 Server File/node_modules/blob/Makefile create mode 100644 Server File/node_modules/blob/README.md create mode 100644 Server File/node_modules/blob/index.js create mode 100644 Server File/node_modules/blob/package.json create mode 100644 Server File/node_modules/blob/test/index.js create mode 100644 Server File/node_modules/callsite/.npmignore create mode 100644 Server File/node_modules/callsite/History.md create mode 100644 Server File/node_modules/callsite/Makefile create mode 100644 Server File/node_modules/callsite/Readme.md create mode 100644 Server File/node_modules/callsite/index.js create mode 100644 Server File/node_modules/callsite/package.json create mode 100644 Server File/node_modules/component-bind/.npmignore create mode 100644 Server File/node_modules/component-bind/History.md create mode 100644 Server File/node_modules/component-bind/Makefile create mode 100644 Server File/node_modules/component-bind/Readme.md create mode 100644 Server File/node_modules/component-bind/component.json create mode 100644 Server File/node_modules/component-bind/index.js create mode 100644 Server File/node_modules/component-bind/package.json create mode 100644 Server File/node_modules/component-emitter/History.md create mode 100644 Server File/node_modules/component-emitter/LICENSE create mode 100644 Server File/node_modules/component-emitter/Readme.md create mode 100644 Server File/node_modules/component-emitter/index.js create mode 100644 Server File/node_modules/component-emitter/package.json create mode 100644 Server File/node_modules/component-inherit/.npmignore create mode 100644 Server File/node_modules/component-inherit/History.md create mode 100644 Server File/node_modules/component-inherit/Makefile create mode 100644 Server File/node_modules/component-inherit/Readme.md create mode 100644 Server File/node_modules/component-inherit/component.json create mode 100644 Server File/node_modules/component-inherit/index.js create mode 100644 Server File/node_modules/component-inherit/package.json create mode 100644 Server File/node_modules/component-inherit/test/inherit.js create mode 100644 Server File/node_modules/content-disposition/HISTORY.md create mode 100644 Server File/node_modules/content-disposition/LICENSE create mode 100644 Server File/node_modules/content-disposition/README.md create mode 100644 Server File/node_modules/content-disposition/index.js create mode 100644 Server File/node_modules/content-disposition/package.json create mode 100644 Server File/node_modules/content-type/HISTORY.md create mode 100644 Server File/node_modules/content-type/LICENSE create mode 100644 Server File/node_modules/content-type/README.md create mode 100644 Server File/node_modules/content-type/index.js create mode 100644 Server File/node_modules/content-type/package.json create mode 100644 Server File/node_modules/cookie-signature/.npmignore create mode 100644 Server File/node_modules/cookie-signature/History.md create mode 100644 Server File/node_modules/cookie-signature/Readme.md create mode 100644 Server File/node_modules/cookie-signature/index.js create mode 100644 Server File/node_modules/cookie-signature/package.json create mode 100644 Server File/node_modules/cookie/HISTORY.md create mode 100644 Server File/node_modules/cookie/LICENSE create mode 100644 Server File/node_modules/cookie/README.md create mode 100644 Server File/node_modules/cookie/index.js create mode 100644 Server File/node_modules/cookie/package.json create mode 100644 Server File/node_modules/core-util-is/LICENSE create mode 100644 Server File/node_modules/core-util-is/README.md create mode 100644 Server File/node_modules/core-util-is/float.patch create mode 100644 Server File/node_modules/core-util-is/lib/util.js create mode 100644 Server File/node_modules/core-util-is/package.json create mode 100644 Server File/node_modules/core-util-is/test.js create mode 100644 Server File/node_modules/debug/.coveralls.yml create mode 100644 Server File/node_modules/debug/.eslintrc create mode 100644 Server File/node_modules/debug/.npmignore create mode 100644 Server File/node_modules/debug/.travis.yml create mode 100644 Server File/node_modules/debug/CHANGELOG.md create mode 100644 Server File/node_modules/debug/LICENSE create mode 100644 Server File/node_modules/debug/Makefile create mode 100644 Server File/node_modules/debug/README.md create mode 100644 Server File/node_modules/debug/component.json create mode 100644 Server File/node_modules/debug/karma.conf.js create mode 100644 Server File/node_modules/debug/node.js create mode 100644 Server File/node_modules/debug/package.json create mode 100644 Server File/node_modules/debug/src/browser.js create mode 100644 Server File/node_modules/debug/src/debug.js create mode 100644 Server File/node_modules/debug/src/index.js create mode 100644 Server File/node_modules/debug/src/node.js create mode 100644 Server File/node_modules/depd/History.md create mode 100644 Server File/node_modules/depd/LICENSE create mode 100644 Server File/node_modules/depd/Readme.md create mode 100644 Server File/node_modules/depd/index.js create mode 100644 Server File/node_modules/depd/lib/browser/index.js create mode 100644 Server File/node_modules/depd/lib/compat/buffer-concat.js create mode 100644 Server File/node_modules/depd/lib/compat/callsite-tostring.js create mode 100644 Server File/node_modules/depd/lib/compat/event-listener-count.js create mode 100644 Server File/node_modules/depd/lib/compat/index.js create mode 100644 Server File/node_modules/depd/package.json create mode 100644 Server File/node_modules/destroy/LICENSE create mode 100644 Server File/node_modules/destroy/README.md create mode 100644 Server File/node_modules/destroy/index.js create mode 100644 Server File/node_modules/destroy/package.json create mode 100644 Server File/node_modules/ee-first/LICENSE create mode 100644 Server File/node_modules/ee-first/README.md create mode 100644 Server File/node_modules/ee-first/index.js create mode 100644 Server File/node_modules/ee-first/package.json create mode 100644 Server File/node_modules/encodeurl/HISTORY.md create mode 100644 Server File/node_modules/encodeurl/LICENSE create mode 100644 Server File/node_modules/encodeurl/README.md create mode 100644 Server File/node_modules/encodeurl/index.js create mode 100644 Server File/node_modules/encodeurl/package.json create mode 100644 Server File/node_modules/engine.io-client/History.md create mode 100644 Server File/node_modules/engine.io-client/LICENSE create mode 100644 Server File/node_modules/engine.io-client/README.md create mode 100644 Server File/node_modules/engine.io-client/engine.io.js create mode 100644 Server File/node_modules/engine.io-client/index.js create mode 100644 Server File/node_modules/engine.io-client/lib/index.js create mode 100644 Server File/node_modules/engine.io-client/lib/socket.js create mode 100644 Server File/node_modules/engine.io-client/lib/transport.js create mode 100644 Server File/node_modules/engine.io-client/lib/transports/index.js create mode 100644 Server File/node_modules/engine.io-client/lib/transports/polling-jsonp.js create mode 100644 Server File/node_modules/engine.io-client/lib/transports/polling-xhr.js create mode 100644 Server File/node_modules/engine.io-client/lib/transports/polling.js create mode 100644 Server File/node_modules/engine.io-client/lib/transports/websocket.js create mode 100644 Server File/node_modules/engine.io-client/lib/xmlhttprequest.js create mode 100644 Server File/node_modules/engine.io-client/package.json create mode 100644 Server File/node_modules/engine.io-parser/History.md create mode 100644 Server File/node_modules/engine.io-parser/LICENSE create mode 100644 Server File/node_modules/engine.io-parser/Readme.md create mode 100644 Server File/node_modules/engine.io-parser/index.js create mode 100644 Server File/node_modules/engine.io-parser/lib/browser.js create mode 100644 Server File/node_modules/engine.io-parser/lib/index.js create mode 100644 Server File/node_modules/engine.io-parser/lib/keys.js create mode 100644 Server File/node_modules/engine.io-parser/lib/utf8.js create mode 100644 Server File/node_modules/engine.io-parser/package.json create mode 100644 Server File/node_modules/engine.io/History.md create mode 100644 Server File/node_modules/engine.io/LICENSE create mode 100644 Server File/node_modules/engine.io/README.md create mode 100644 Server File/node_modules/engine.io/index.js create mode 100644 Server File/node_modules/engine.io/lib/engine.io.js create mode 100644 Server File/node_modules/engine.io/lib/server.js create mode 100644 Server File/node_modules/engine.io/lib/socket.js create mode 100644 Server File/node_modules/engine.io/lib/transport.js create mode 100644 Server File/node_modules/engine.io/lib/transports/index.js create mode 100644 Server File/node_modules/engine.io/lib/transports/polling-jsonp.js create mode 100644 Server File/node_modules/engine.io/lib/transports/polling-xhr.js create mode 100644 Server File/node_modules/engine.io/lib/transports/polling.js create mode 100644 Server File/node_modules/engine.io/lib/transports/websocket.js create mode 100644 Server File/node_modules/engine.io/package.json create mode 100644 Server File/node_modules/escape-html/LICENSE create mode 100644 Server File/node_modules/escape-html/Readme.md create mode 100644 Server File/node_modules/escape-html/index.js create mode 100644 Server File/node_modules/escape-html/package.json create mode 100644 Server File/node_modules/etag/HISTORY.md create mode 100644 Server File/node_modules/etag/LICENSE create mode 100644 Server File/node_modules/etag/README.md create mode 100644 Server File/node_modules/etag/index.js create mode 100644 Server File/node_modules/etag/package.json create mode 100644 Server File/node_modules/express/History.md create mode 100644 Server File/node_modules/express/LICENSE create mode 100644 Server File/node_modules/express/Readme.md create mode 100644 Server File/node_modules/express/index.js create mode 100644 Server File/node_modules/express/lib/application.js create mode 100644 Server File/node_modules/express/lib/express.js create mode 100644 Server File/node_modules/express/lib/middleware/init.js create mode 100644 Server File/node_modules/express/lib/middleware/query.js create mode 100644 Server File/node_modules/express/lib/request.js create mode 100644 Server File/node_modules/express/lib/response.js create mode 100644 Server File/node_modules/express/lib/router/index.js create mode 100644 Server File/node_modules/express/lib/router/layer.js create mode 100644 Server File/node_modules/express/lib/router/route.js create mode 100644 Server File/node_modules/express/lib/utils.js create mode 100644 Server File/node_modules/express/lib/view.js create mode 100644 Server File/node_modules/express/package.json create mode 100644 Server File/node_modules/finalhandler/HISTORY.md create mode 100644 Server File/node_modules/finalhandler/LICENSE create mode 100644 Server File/node_modules/finalhandler/README.md create mode 100644 Server File/node_modules/finalhandler/index.js create mode 100644 Server File/node_modules/finalhandler/package.json create mode 100644 Server File/node_modules/forwarded/HISTORY.md create mode 100644 Server File/node_modules/forwarded/LICENSE create mode 100644 Server File/node_modules/forwarded/README.md create mode 100644 Server File/node_modules/forwarded/index.js create mode 100644 Server File/node_modules/forwarded/package.json create mode 100644 Server File/node_modules/fresh/HISTORY.md create mode 100644 Server File/node_modules/fresh/LICENSE create mode 100644 Server File/node_modules/fresh/README.md create mode 100644 Server File/node_modules/fresh/index.js create mode 100644 Server File/node_modules/fresh/package.json create mode 100644 Server File/node_modules/has-binary2/History.md create mode 100644 Server File/node_modules/has-binary2/LICENSE create mode 100644 Server File/node_modules/has-binary2/README.md create mode 100644 Server File/node_modules/has-binary2/index.js create mode 100644 Server File/node_modules/has-binary2/node_modules/isarray/README.md create mode 100644 Server File/node_modules/has-binary2/node_modules/isarray/index.js create mode 100644 Server File/node_modules/has-binary2/node_modules/isarray/package.json create mode 100644 Server File/node_modules/has-binary2/package.json create mode 100644 Server File/node_modules/has-cors/.npmignore create mode 100644 Server File/node_modules/has-cors/History.md create mode 100644 Server File/node_modules/has-cors/Makefile create mode 100644 Server File/node_modules/has-cors/Readme.md create mode 100644 Server File/node_modules/has-cors/component.json create mode 100644 Server File/node_modules/has-cors/index.js create mode 100644 Server File/node_modules/has-cors/package.json create mode 100644 Server File/node_modules/has-cors/test.js create mode 100644 Server File/node_modules/http-errors/HISTORY.md create mode 100644 Server File/node_modules/http-errors/LICENSE create mode 100644 Server File/node_modules/http-errors/README.md create mode 100644 Server File/node_modules/http-errors/index.js create mode 100644 Server File/node_modules/http-errors/package.json create mode 100644 Server File/node_modules/indexof/.npmignore create mode 100644 Server File/node_modules/indexof/Makefile create mode 100644 Server File/node_modules/indexof/Readme.md create mode 100644 Server File/node_modules/indexof/component.json create mode 100644 Server File/node_modules/indexof/index.js create mode 100644 Server File/node_modules/indexof/package.json create mode 100644 Server File/node_modules/inherits/LICENSE create mode 100644 Server File/node_modules/inherits/README.md create mode 100644 Server File/node_modules/inherits/inherits.js create mode 100644 Server File/node_modules/inherits/inherits_browser.js create mode 100644 Server File/node_modules/inherits/package.json create mode 100644 Server File/node_modules/ipaddr.js/.npmignore create mode 100644 Server File/node_modules/ipaddr.js/.travis.yml create mode 100644 Server File/node_modules/ipaddr.js/Cakefile create mode 100644 Server File/node_modules/ipaddr.js/LICENSE create mode 100644 Server File/node_modules/ipaddr.js/README.md create mode 100644 Server File/node_modules/ipaddr.js/bower.json create mode 100644 Server File/node_modules/ipaddr.js/ipaddr.min.js create mode 100644 Server File/node_modules/ipaddr.js/lib/ipaddr.js create mode 100644 Server File/node_modules/ipaddr.js/package.json create mode 100644 Server File/node_modules/ipaddr.js/src/ipaddr.coffee create mode 100644 Server File/node_modules/ipaddr.js/test/ipaddr.test.coffee create mode 100644 Server File/node_modules/isarray/README.md create mode 100644 Server File/node_modules/isarray/build/build.js create mode 100644 Server File/node_modules/isarray/component.json create mode 100644 Server File/node_modules/isarray/index.js create mode 100644 Server File/node_modules/isarray/package.json create mode 100644 Server File/node_modules/media-typer/HISTORY.md create mode 100644 Server File/node_modules/media-typer/LICENSE create mode 100644 Server File/node_modules/media-typer/README.md create mode 100644 Server File/node_modules/media-typer/index.js create mode 100644 Server File/node_modules/media-typer/package.json create mode 100644 Server File/node_modules/merge-descriptors/HISTORY.md create mode 100644 Server File/node_modules/merge-descriptors/LICENSE create mode 100644 Server File/node_modules/merge-descriptors/README.md create mode 100644 Server File/node_modules/merge-descriptors/index.js create mode 100644 Server File/node_modules/merge-descriptors/package.json create mode 100644 Server File/node_modules/methods/HISTORY.md create mode 100644 Server File/node_modules/methods/LICENSE create mode 100644 Server File/node_modules/methods/README.md create mode 100644 Server File/node_modules/methods/index.js create mode 100644 Server File/node_modules/methods/package.json create mode 100644 Server File/node_modules/mime-db/HISTORY.md create mode 100644 Server File/node_modules/mime-db/LICENSE create mode 100644 Server File/node_modules/mime-db/README.md create mode 100644 Server File/node_modules/mime-db/db.json create mode 100644 Server File/node_modules/mime-db/index.js create mode 100644 Server File/node_modules/mime-db/package.json create mode 100644 Server File/node_modules/mime-types/HISTORY.md create mode 100644 Server File/node_modules/mime-types/LICENSE create mode 100644 Server File/node_modules/mime-types/README.md create mode 100644 Server File/node_modules/mime-types/index.js create mode 100644 Server File/node_modules/mime-types/package.json create mode 100644 Server File/node_modules/mime/.npmignore create mode 100644 Server File/node_modules/mime/LICENSE create mode 100644 Server File/node_modules/mime/README.md create mode 100644 Server File/node_modules/mime/build/build.js create mode 100644 Server File/node_modules/mime/build/test.js create mode 100644 Server File/node_modules/mime/cli.js create mode 100644 Server File/node_modules/mime/mime.js create mode 100644 Server File/node_modules/mime/package.json create mode 100644 Server File/node_modules/mime/types.json create mode 100644 Server File/node_modules/ms/index.js create mode 100644 Server File/node_modules/ms/license.md create mode 100644 Server File/node_modules/ms/package.json create mode 100644 Server File/node_modules/ms/readme.md create mode 100644 Server File/node_modules/mysql/Changes.md create mode 100644 Server File/node_modules/mysql/License create mode 100644 Server File/node_modules/mysql/Readme.md create mode 100644 Server File/node_modules/mysql/index.js create mode 100644 Server File/node_modules/mysql/lib/Connection.js create mode 100644 Server File/node_modules/mysql/lib/ConnectionConfig.js create mode 100644 Server File/node_modules/mysql/lib/Pool.js create mode 100644 Server File/node_modules/mysql/lib/PoolCluster.js create mode 100644 Server File/node_modules/mysql/lib/PoolConfig.js create mode 100644 Server File/node_modules/mysql/lib/PoolConnection.js create mode 100644 Server File/node_modules/mysql/lib/PoolNamespace.js create mode 100644 Server File/node_modules/mysql/lib/PoolSelector.js create mode 100644 Server File/node_modules/mysql/lib/protocol/Auth.js create mode 100644 Server File/node_modules/mysql/lib/protocol/BufferList.js create mode 100644 Server File/node_modules/mysql/lib/protocol/PacketHeader.js create mode 100644 Server File/node_modules/mysql/lib/protocol/PacketWriter.js create mode 100644 Server File/node_modules/mysql/lib/protocol/Parser.js create mode 100644 Server File/node_modules/mysql/lib/protocol/Protocol.js create mode 100644 Server File/node_modules/mysql/lib/protocol/ResultSet.js create mode 100644 Server File/node_modules/mysql/lib/protocol/SqlString.js create mode 100644 Server File/node_modules/mysql/lib/protocol/constants/charsets.js create mode 100644 Server File/node_modules/mysql/lib/protocol/constants/client.js create mode 100644 Server File/node_modules/mysql/lib/protocol/constants/errors.js create mode 100644 Server File/node_modules/mysql/lib/protocol/constants/field_flags.js create mode 100644 Server File/node_modules/mysql/lib/protocol/constants/server_status.js create mode 100644 Server File/node_modules/mysql/lib/protocol/constants/ssl_profiles.js create mode 100644 Server File/node_modules/mysql/lib/protocol/constants/types.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/ComPingPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/ComQueryPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/ComQuitPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/EmptyPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/EofPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/ErrorPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/Field.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/FieldPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/HandshakeInitializationPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/OkPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/RowDataPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/StatisticsPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js create mode 100644 Server File/node_modules/mysql/lib/protocol/packets/index.js create mode 100644 Server File/node_modules/mysql/lib/protocol/sequences/ChangeUser.js create mode 100644 Server File/node_modules/mysql/lib/protocol/sequences/Handshake.js create mode 100644 Server File/node_modules/mysql/lib/protocol/sequences/Ping.js create mode 100644 Server File/node_modules/mysql/lib/protocol/sequences/Query.js create mode 100644 Server File/node_modules/mysql/lib/protocol/sequences/Quit.js create mode 100644 Server File/node_modules/mysql/lib/protocol/sequences/Sequence.js create mode 100644 Server File/node_modules/mysql/lib/protocol/sequences/Statistics.js create mode 100644 Server File/node_modules/mysql/lib/protocol/sequences/index.js create mode 100644 Server File/node_modules/mysql/package.json create mode 100644 Server File/node_modules/negotiator/HISTORY.md create mode 100644 Server File/node_modules/negotiator/LICENSE create mode 100644 Server File/node_modules/negotiator/README.md create mode 100644 Server File/node_modules/negotiator/index.js create mode 100644 Server File/node_modules/negotiator/lib/charset.js create mode 100644 Server File/node_modules/negotiator/lib/encoding.js create mode 100644 Server File/node_modules/negotiator/lib/language.js create mode 100644 Server File/node_modules/negotiator/lib/mediaType.js create mode 100644 Server File/node_modules/negotiator/package.json create mode 100644 Server File/node_modules/object-assign/index.js create mode 100644 Server File/node_modules/object-assign/license create mode 100644 Server File/node_modules/object-assign/package.json create mode 100644 Server File/node_modules/object-assign/readme.md create mode 100644 Server File/node_modules/object-component/.npmignore create mode 100644 Server File/node_modules/object-component/History.md create mode 100644 Server File/node_modules/object-component/Makefile create mode 100644 Server File/node_modules/object-component/Readme.md create mode 100644 Server File/node_modules/object-component/component.json create mode 100644 Server File/node_modules/object-component/index.js create mode 100644 Server File/node_modules/object-component/package.json create mode 100644 Server File/node_modules/object-component/test/object.js create mode 100644 Server File/node_modules/on-finished/HISTORY.md create mode 100644 Server File/node_modules/on-finished/LICENSE create mode 100644 Server File/node_modules/on-finished/README.md create mode 100644 Server File/node_modules/on-finished/index.js create mode 100644 Server File/node_modules/on-finished/package.json create mode 100644 Server File/node_modules/parsejson/.npmignore create mode 100644 Server File/node_modules/parsejson/LICENSE create mode 100644 Server File/node_modules/parsejson/Makefile create mode 100644 Server File/node_modules/parsejson/README.md create mode 100644 Server File/node_modules/parsejson/index.js create mode 100644 Server File/node_modules/parsejson/package.json create mode 100644 Server File/node_modules/parsejson/test.js create mode 100644 Server File/node_modules/parseqs/.npmignore create mode 100644 Server File/node_modules/parseqs/LICENSE create mode 100644 Server File/node_modules/parseqs/Makefile create mode 100644 Server File/node_modules/parseqs/README.md create mode 100644 Server File/node_modules/parseqs/index.js create mode 100644 Server File/node_modules/parseqs/package.json create mode 100644 Server File/node_modules/parseqs/test.js create mode 100644 Server File/node_modules/parseuri/.npmignore create mode 100644 Server File/node_modules/parseuri/History.md create mode 100644 Server File/node_modules/parseuri/LICENSE create mode 100644 Server File/node_modules/parseuri/Makefile create mode 100644 Server File/node_modules/parseuri/README.md create mode 100644 Server File/node_modules/parseuri/index.js create mode 100644 Server File/node_modules/parseuri/package.json create mode 100644 Server File/node_modules/parseuri/test.js create mode 100644 Server File/node_modules/parseurl/HISTORY.md create mode 100644 Server File/node_modules/parseurl/LICENSE create mode 100644 Server File/node_modules/parseurl/README.md create mode 100644 Server File/node_modules/parseurl/index.js create mode 100644 Server File/node_modules/parseurl/package.json create mode 100644 Server File/node_modules/path-to-regexp/History.md create mode 100644 Server File/node_modules/path-to-regexp/LICENSE create mode 100644 Server File/node_modules/path-to-regexp/Readme.md create mode 100644 Server File/node_modules/path-to-regexp/index.js create mode 100644 Server File/node_modules/path-to-regexp/package.json create mode 100644 Server File/node_modules/proxy-addr/HISTORY.md create mode 100644 Server File/node_modules/proxy-addr/LICENSE create mode 100644 Server File/node_modules/proxy-addr/README.md create mode 100644 Server File/node_modules/proxy-addr/index.js create mode 100644 Server File/node_modules/proxy-addr/package.json create mode 100644 Server File/node_modules/qs/.eslintignore create mode 100644 Server File/node_modules/qs/.eslintrc create mode 100644 Server File/node_modules/qs/.jscs.json create mode 100644 Server File/node_modules/qs/CHANGELOG.md create mode 100644 Server File/node_modules/qs/LICENSE create mode 100644 Server File/node_modules/qs/README.md create mode 100644 Server File/node_modules/qs/dist/qs.js create mode 100644 Server File/node_modules/qs/lib/formats.js create mode 100644 Server File/node_modules/qs/lib/index.js create mode 100644 Server File/node_modules/qs/lib/parse.js create mode 100644 Server File/node_modules/qs/lib/stringify.js create mode 100644 Server File/node_modules/qs/lib/utils.js create mode 100644 Server File/node_modules/qs/package.json create mode 100644 Server File/node_modules/qs/test/.eslintrc create mode 100644 Server File/node_modules/qs/test/index.js create mode 100644 Server File/node_modules/qs/test/parse.js create mode 100644 Server File/node_modules/qs/test/stringify.js create mode 100644 Server File/node_modules/qs/test/utils.js create mode 100644 Server File/node_modules/range-parser/HISTORY.md create mode 100644 Server File/node_modules/range-parser/LICENSE create mode 100644 Server File/node_modules/range-parser/README.md create mode 100644 Server File/node_modules/range-parser/index.js create mode 100644 Server File/node_modules/range-parser/package.json create mode 100644 Server File/node_modules/readable-stream/.npmignore create mode 100644 Server File/node_modules/readable-stream/LICENSE create mode 100644 Server File/node_modules/readable-stream/README.md create mode 100644 Server File/node_modules/readable-stream/duplex.js create mode 100644 Server File/node_modules/readable-stream/float.patch create mode 100644 Server File/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 Server File/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 Server File/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 Server File/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 Server File/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 Server File/node_modules/readable-stream/package.json create mode 100644 Server File/node_modules/readable-stream/passthrough.js create mode 100644 Server File/node_modules/readable-stream/readable.js create mode 100644 Server File/node_modules/readable-stream/transform.js create mode 100644 Server File/node_modules/readable-stream/writable.js create mode 100644 Server File/node_modules/safe-buffer/.travis.yml create mode 100644 Server File/node_modules/safe-buffer/LICENSE create mode 100644 Server File/node_modules/safe-buffer/README.md create mode 100644 Server File/node_modules/safe-buffer/browser.js create mode 100644 Server File/node_modules/safe-buffer/index.js create mode 100644 Server File/node_modules/safe-buffer/package.json create mode 100644 Server File/node_modules/safe-buffer/test.js create mode 100644 Server File/node_modules/send/HISTORY.md create mode 100644 Server File/node_modules/send/LICENSE create mode 100644 Server File/node_modules/send/README.md create mode 100644 Server File/node_modules/send/index.js create mode 100644 Server File/node_modules/send/package.json create mode 100644 Server File/node_modules/serve-static/HISTORY.md create mode 100644 Server File/node_modules/serve-static/LICENSE create mode 100644 Server File/node_modules/serve-static/README.md create mode 100644 Server File/node_modules/serve-static/index.js create mode 100644 Server File/node_modules/serve-static/package.json create mode 100644 Server File/node_modules/setprototypeof/LICENSE create mode 100644 Server File/node_modules/setprototypeof/README.md create mode 100644 Server File/node_modules/setprototypeof/index.js create mode 100644 Server File/node_modules/setprototypeof/package.json create mode 100644 Server File/node_modules/socket.io-adapter/.npmignore create mode 100644 Server File/node_modules/socket.io-adapter/History.md create mode 100644 Server File/node_modules/socket.io-adapter/LICENSE create mode 100644 Server File/node_modules/socket.io-adapter/Readme.md create mode 100644 Server File/node_modules/socket.io-adapter/index.js create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/.jshintrc create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/.npmignore create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/CHANGELOG.md create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/LICENSE create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/Makefile create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/Readme.md create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/bower.json create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/browser.js create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/component.json create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/debug.js create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/index.js create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/node.js create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/debug/package.json create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/ms/LICENSE.md create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/ms/README.md create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/ms/index.js create mode 100644 Server File/node_modules/socket.io-adapter/node_modules/ms/package.json create mode 100644 Server File/node_modules/socket.io-adapter/package.json create mode 100644 Server File/node_modules/socket.io-client/History.md create mode 100644 Server File/node_modules/socket.io-client/LICENSE create mode 100644 Server File/node_modules/socket.io-client/README.md create mode 100644 Server File/node_modules/socket.io-client/dist/socket.io.js create mode 100644 Server File/node_modules/socket.io-client/dist/socket.io.js.map create mode 100644 Server File/node_modules/socket.io-client/dist/socket.io.slim.js create mode 100644 Server File/node_modules/socket.io-client/dist/socket.io.slim.js.map create mode 100644 Server File/node_modules/socket.io-client/lib/index.js create mode 100644 Server File/node_modules/socket.io-client/lib/manager.js create mode 100644 Server File/node_modules/socket.io-client/lib/on.js create mode 100644 Server File/node_modules/socket.io-client/lib/socket.js create mode 100644 Server File/node_modules/socket.io-client/lib/url.js create mode 100644 Server File/node_modules/socket.io-client/package.json create mode 100644 Server File/node_modules/socket.io-parser/History.md create mode 100644 Server File/node_modules/socket.io-parser/LICENSE create mode 100644 Server File/node_modules/socket.io-parser/Readme.md create mode 100644 Server File/node_modules/socket.io-parser/binary.js create mode 100644 Server File/node_modules/socket.io-parser/index.js create mode 100644 Server File/node_modules/socket.io-parser/is-buffer.js create mode 100644 Server File/node_modules/socket.io-parser/node_modules/isarray/README.md create mode 100644 Server File/node_modules/socket.io-parser/node_modules/isarray/index.js create mode 100644 Server File/node_modules/socket.io-parser/node_modules/isarray/package.json create mode 100644 Server File/node_modules/socket.io-parser/package.json create mode 100644 Server File/node_modules/socket.io/History.md create mode 100644 Server File/node_modules/socket.io/LICENSE create mode 100644 Server File/node_modules/socket.io/Readme.md create mode 100644 Server File/node_modules/socket.io/lib/client.js create mode 100644 Server File/node_modules/socket.io/lib/index.js create mode 100644 Server File/node_modules/socket.io/lib/namespace.js create mode 100644 Server File/node_modules/socket.io/lib/socket.js create mode 100644 Server File/node_modules/socket.io/package.json create mode 100644 Server File/node_modules/sqlstring/HISTORY.md create mode 100644 Server File/node_modules/sqlstring/LICENSE create mode 100644 Server File/node_modules/sqlstring/README.md create mode 100644 Server File/node_modules/sqlstring/index.js create mode 100644 Server File/node_modules/sqlstring/lib/SqlString.js create mode 100644 Server File/node_modules/sqlstring/package.json create mode 100644 Server File/node_modules/statuses/HISTORY.md create mode 100644 Server File/node_modules/statuses/LICENSE create mode 100644 Server File/node_modules/statuses/README.md create mode 100644 Server File/node_modules/statuses/codes.json create mode 100644 Server File/node_modules/statuses/index.js create mode 100644 Server File/node_modules/statuses/package.json create mode 100644 Server File/node_modules/string_decoder/.npmignore create mode 100644 Server File/node_modules/string_decoder/LICENSE create mode 100644 Server File/node_modules/string_decoder/README.md create mode 100644 Server File/node_modules/string_decoder/index.js create mode 100644 Server File/node_modules/string_decoder/package.json create mode 100644 Server File/node_modules/to-array/.npmignore create mode 100644 Server File/node_modules/to-array/LICENCE create mode 100644 Server File/node_modules/to-array/README.md create mode 100644 Server File/node_modules/to-array/index.js create mode 100644 Server File/node_modules/to-array/package.json create mode 100644 Server File/node_modules/type-is/HISTORY.md create mode 100644 Server File/node_modules/type-is/LICENSE create mode 100644 Server File/node_modules/type-is/README.md create mode 100644 Server File/node_modules/type-is/index.js create mode 100644 Server File/node_modules/type-is/package.json create mode 100644 Server File/node_modules/ultron/LICENSE create mode 100644 Server File/node_modules/ultron/index.js create mode 100644 Server File/node_modules/ultron/package.json create mode 100644 Server File/node_modules/unpipe/HISTORY.md create mode 100644 Server File/node_modules/unpipe/LICENSE create mode 100644 Server File/node_modules/unpipe/README.md create mode 100644 Server File/node_modules/unpipe/index.js create mode 100644 Server File/node_modules/unpipe/package.json create mode 100644 Server File/node_modules/utils-merge/.travis.yml create mode 100644 Server File/node_modules/utils-merge/LICENSE create mode 100644 Server File/node_modules/utils-merge/README.md create mode 100644 Server File/node_modules/utils-merge/index.js create mode 100644 Server File/node_modules/utils-merge/package.json create mode 100644 Server File/node_modules/uws/LICENSE create mode 100644 Server File/node_modules/uws/README.md create mode 100644 Server File/node_modules/uws/binding.gyp create mode 100644 Server File/node_modules/uws/build_log.txt create mode 100644 Server File/node_modules/uws/package.json create mode 100644 Server File/node_modules/uws/src/Asio.h create mode 100644 Server File/node_modules/uws/src/Backend.h create mode 100644 Server File/node_modules/uws/src/Epoll.cpp create mode 100644 Server File/node_modules/uws/src/Epoll.h create mode 100644 Server File/node_modules/uws/src/Extensions.cpp create mode 100644 Server File/node_modules/uws/src/Extensions.h create mode 100644 Server File/node_modules/uws/src/Group.cpp create mode 100644 Server File/node_modules/uws/src/Group.h create mode 100644 Server File/node_modules/uws/src/HTTPSocket.cpp create mode 100644 Server File/node_modules/uws/src/HTTPSocket.h create mode 100644 Server File/node_modules/uws/src/Hub.cpp create mode 100644 Server File/node_modules/uws/src/Hub.h create mode 100644 Server File/node_modules/uws/src/Libuv.h create mode 100644 Server File/node_modules/uws/src/Networking.cpp create mode 100644 Server File/node_modules/uws/src/Networking.h create mode 100644 Server File/node_modules/uws/src/Node.cpp create mode 100644 Server File/node_modules/uws/src/Node.h create mode 100644 Server File/node_modules/uws/src/Socket.cpp create mode 100644 Server File/node_modules/uws/src/Socket.h create mode 100644 Server File/node_modules/uws/src/WebSocket.cpp create mode 100644 Server File/node_modules/uws/src/WebSocket.h create mode 100644 Server File/node_modules/uws/src/WebSocketProtocol.h create mode 100644 Server File/node_modules/uws/src/addon.cpp create mode 100644 Server File/node_modules/uws/src/addon.h create mode 100644 Server File/node_modules/uws/src/http.h create mode 100644 Server File/node_modules/uws/src/uWS.h create mode 100644 Server File/node_modules/uws/uws.js create mode 100644 Server File/node_modules/uws/uws_darwin_46.node create mode 100644 Server File/node_modules/uws/uws_darwin_47.node create mode 100644 Server File/node_modules/uws/uws_darwin_48.node create mode 100644 Server File/node_modules/uws/uws_darwin_51.node create mode 100644 Server File/node_modules/uws/uws_linux_46.node create mode 100644 Server File/node_modules/uws/uws_linux_47.node create mode 100644 Server File/node_modules/uws/uws_linux_48.node create mode 100644 Server File/node_modules/uws/uws_linux_51.node create mode 100644 Server File/node_modules/uws/uws_win32_48.node create mode 100644 Server File/node_modules/uws/uws_win32_51.node create mode 100644 Server File/node_modules/vary/HISTORY.md create mode 100644 Server File/node_modules/vary/LICENSE create mode 100644 Server File/node_modules/vary/README.md create mode 100644 Server File/node_modules/vary/index.js create mode 100644 Server File/node_modules/vary/package.json create mode 100644 Server File/node_modules/ws/LICENSE create mode 100644 Server File/node_modules/ws/README.md create mode 100644 Server File/node_modules/ws/index.js create mode 100644 Server File/node_modules/ws/lib/BufferUtil.js create mode 100644 Server File/node_modules/ws/lib/Constants.js create mode 100644 Server File/node_modules/ws/lib/ErrorCodes.js create mode 100644 Server File/node_modules/ws/lib/EventTarget.js create mode 100644 Server File/node_modules/ws/lib/Extensions.js create mode 100644 Server File/node_modules/ws/lib/PerMessageDeflate.js create mode 100644 Server File/node_modules/ws/lib/Receiver.js create mode 100644 Server File/node_modules/ws/lib/Sender.js create mode 100644 Server File/node_modules/ws/lib/Validation.js create mode 100644 Server File/node_modules/ws/lib/WebSocket.js create mode 100644 Server File/node_modules/ws/lib/WebSocketServer.js create mode 100644 Server File/node_modules/ws/package.json create mode 100644 Server File/node_modules/xmlhttprequest-ssl/LICENSE create mode 100644 Server File/node_modules/xmlhttprequest-ssl/README.md create mode 100644 Server File/node_modules/xmlhttprequest-ssl/autotest.watchr create mode 100644 Server File/node_modules/xmlhttprequest-ssl/example/demo.js create mode 100644 Server File/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js create mode 100644 Server File/node_modules/xmlhttprequest-ssl/package.json create mode 100644 Server File/node_modules/xmlhttprequest-ssl/tests/test-constants.js create mode 100644 Server File/node_modules/xmlhttprequest-ssl/tests/test-events.js create mode 100644 Server File/node_modules/xmlhttprequest-ssl/tests/test-exceptions.js create mode 100644 Server File/node_modules/xmlhttprequest-ssl/tests/test-headers.js create mode 100644 Server File/node_modules/xmlhttprequest-ssl/tests/test-redirect-302.js create mode 100644 Server File/node_modules/xmlhttprequest-ssl/tests/test-redirect-303.js create mode 100644 Server File/node_modules/xmlhttprequest-ssl/tests/test-redirect-307.js create mode 100644 Server File/node_modules/xmlhttprequest-ssl/tests/test-request-methods.js create mode 100644 Server File/node_modules/xmlhttprequest-ssl/tests/test-request-protocols.js create mode 100644 Server File/node_modules/xmlhttprequest-ssl/tests/testdata.txt create mode 100644 Server File/node_modules/yeast/LICENSE create mode 100644 Server File/node_modules/yeast/README.md create mode 100644 Server File/node_modules/yeast/index.js create mode 100644 Server File/node_modules/yeast/package.json create mode 100644 Server File/package.json create mode 100644 Server File/test.js create mode 100644 app/.gitignore create mode 100644 app/build.gradle create mode 100644 app/proguard-rules.pro create mode 100644 app/src/androidTest/java/com/example/tejas/video_player/ExampleInstrumentedTest.java create mode 100644 app/src/main/AndroidManifest.xml create mode 100644 app/src/main/java/com/example/tejas/video_player/MainActivity.java create mode 100644 app/src/main/res/layout/activity_main.xml create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 app/src/main/res/raw/aaa.mp4 create mode 100644 app/src/main/res/raw/aaa/mp4 create mode 100644 app/src/main/res/values/colors.xml create mode 100644 app/src/main/res/values/strings.xml create mode 100644 app/src/main/res/values/styles.xml create mode 100644 app/src/test/java/com/example/tejas/video_player/ExampleUnitTest.java create mode 100644 build.gradle create mode 100644 gradle.properties create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..39fb081 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.externalNativeBuild diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..492b1e8 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +Video_Player \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..96cc43e --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..489cc05 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..5d19981 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..e03302e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/JUNK/639486063 Automatic Bulldoze v2/AutomaticBulldozeV2.dll b/JUN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TbWM)guA*E>CCqdzpZ(EnTIn+;ptPBAiEj2pk07XxFu@CZRiHvfOd&n(KX2P z^OWO{AMr&IA0iZdjaW!miBjutk*wo|O+doKEI}&Y%B-<(k)pU`;hQXePRF;Bgqzlr z-69DFdcg5h2$i4{-~U**Mkh+TOYkf}zpek4;0_Tspw;-gTf%pve1psPTp38gtq-+A zqd2}2wQk8m;~1Hsia$VsB1n$B(-MAbfYvwj3*K tyhX>`bD5}9hf(DF>@-F@C2lT1tsczs*`96I-!4AMgZlrU|K}|5zX7ce3ikj2 literal 0 HcmV?d00001 diff --git a/JUNK/OO/.gitignore b/JUNK/OO/.gitignore new file mode 100644 index 0000000..39fb081 --- /dev/null +++ b/JUNK/OO/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.externalNativeBuild diff --git a/JUNK/OO/.idea/compiler.xml b/JUNK/OO/.idea/compiler.xml new file mode 100644 index 0000000..96cc43e --- /dev/null +++ b/JUNK/OO/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JUNK/OO/.idea/copyright/profiles_settings.xml b/JUNK/OO/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/JUNK/OO/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/JUNK/OO/.idea/gradle.xml b/JUNK/OO/.idea/gradle.xml new file mode 100644 index 0000000..7ac24c7 --- /dev/null +++ b/JUNK/OO/.idea/gradle.xml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/JUNK/OO/.idea/misc.xml b/JUNK/OO/.idea/misc.xml new file mode 100644 index 0000000..fbb6828 --- /dev/null +++ b/JUNK/OO/.idea/misc.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JUNK/OO/.idea/modules.xml b/JUNK/OO/.idea/modules.xml new file mode 100644 index 0000000..db8a577 --- /dev/null +++ b/JUNK/OO/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/JUNK/OO/.idea/runConfigurations.xml b/JUNK/OO/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/JUNK/OO/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/JUNK/OO/app/.gitignore b/JUNK/OO/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/JUNK/OO/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/JUNK/OO/app/build.gradle b/JUNK/OO/app/build.gradle new file mode 100644 index 0000000..27a5bea --- /dev/null +++ b/JUNK/OO/app/build.gradle @@ -0,0 +1,30 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 26 + buildToolsVersion "26.0.0" + defaultConfig { + applicationId "com.example.tejas.oo" + minSdkVersion 23 + targetSdkVersion 26 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + exclude group: 'com.android.support', module: 'support-annotations' + }) + compile 'com.android.support:appcompat-v7:26.+' + compile 'com.android.support.constraint:constraint-layout:1.0.2' + testCompile 'junit:junit:4.12' +} diff --git a/JUNK/OO/app/proguard-rules.pro b/JUNK/OO/app/proguard-rules.pro new file mode 100644 index 0000000..6733beb --- /dev/null +++ b/JUNK/OO/app/proguard-rules.pro @@ -0,0 +1,25 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in C:\Users\Tejas\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/JUNK/OO/app/src/androidTest/java/com/example/tejas/oo/ExampleInstrumentedTest.java b/JUNK/OO/app/src/androidTest/java/com/example/tejas/oo/ExampleInstrumentedTest.java new file mode 100644 index 0000000..f7da86e --- /dev/null +++ b/JUNK/OO/app/src/androidTest/java/com/example/tejas/oo/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.tejas.oo; + +import android.content.Context; +import android.support.test.InstrumentationRegistry; +import android.support.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumentation test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() throws Exception { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getTargetContext(); + + assertEquals("com.example.tejas.oo", appContext.getPackageName()); + } +} diff --git a/JUNK/OO/app/src/main/AndroidManifest.xml b/JUNK/OO/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..e7970be --- /dev/null +++ b/JUNK/OO/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JUNK/OO/app/src/main/java/com/example/tejas/oo/MainActivity.java b/JUNK/OO/app/src/main/java/com/example/tejas/oo/MainActivity.java new file mode 100644 index 0000000..53a0da5 --- /dev/null +++ b/JUNK/OO/app/src/main/java/com/example/tejas/oo/MainActivity.java @@ -0,0 +1,89 @@ +package com.example.tejas.oo; + +import android.location.GpsStatus; +import android.location.Location; +import android.location.LocationListener; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; + +import android.app.Activity; +import android.app.AlertDialog; +import android.app.Dialog; +import android.bluetooth.BluetoothAdapter; +import android.content.ComponentName; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.ServiceConnection; +import android.content.SharedPreferences; +import android.hardware.Sensor; +import android.hardware.SensorEvent; +import android.hardware.SensorEventListener; +import android.hardware.SensorManager; +import android.location.GpsStatus; +import android.location.Location; +import android.location.LocationListener; +import android.location.LocationManager; +import android.location.LocationProvider; +import android.os.AsyncTask; +import android.os.Bundle; +import android.os.Handler; +import android.os.IBinder; +import android.os.PowerManager; +import android.util.Log; +import android.view.Gravity; +import android.view.Menu; +import android.view.MenuItem; +import android.view.ViewGroup; +import android.view.ViewGroup.LayoutParams; +import android.view.ViewGroup.MarginLayoutParams; +import android.widget.LinearLayout; +import android.widget.TableLayout; +import android.widget.TableRow; +import android.widget.TextView; +import android.widget.Toast; + + +import retrofit.RestAdapter; +import retrofit.RetrofitError; +import retrofit.client.Response; +import roboguice.RoboGuice; +import roboguice.activity.RoboActivity; +import roboguice.inject.ContentView; +import roboguice.inject.InjectView; + + + +public class MainActivity extends RoboActivity implements ObdProgressListener, LocationListener, GpsStatus.Listener { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + } + + @Override + public void onGpsStatusChanged(int i) { + + } + + @Override + public void onLocationChanged(Location location) { + + } + + @Override + public void onStatusChanged(String s, int i, Bundle bundle) { + + } + + @Override + public void onProviderEnabled(String s) { + + } + + @Override + public void onProviderDisabled(String s) { + + } +} diff --git a/JUNK/OO/app/src/main/res/layout/activity_main.xml b/JUNK/OO/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..b56acb2 --- /dev/null +++ b/JUNK/OO/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/JUNK/OO/app/src/main/res/mipmap-hdpi/ic_launcher.png b/JUNK/OO/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..cde69bcccec65160d92116f20ffce4fce0b5245c GIT binary patch literal 3418 zcmZ{nX*|@A^T0p5j$I+^%FVhdvMbgt%d+mG98ubwNv_tpITppba^GiieBBZGI>I89 zGgm8TA>_)DlEu&W;s3#ZUNiH4&CF{a%siTjzG;eOzQB6{003qKeT?}z_5U*{{kgZ; zdV@U&tqa-&4FGisjMN8o=P}$t-`oTM2oeB5d9mHPgTYJx4jup)+5a;Tke$m708DocFzDL>U$$}s6FGiy_I1?O zHXq`q884|^O4Q*%V#vwxqCz-#8i`Gu)2LeB0{%%VKunOF%9~JcFB9MM>N00M`E~;o zBU%)O5u-D6NF~OQV7TV#JAN;=Lylgxy0kncoQpGq<<_gxw`FC=C-cV#$L|(47Hatl ztq3Jngq00x#}HGW@_tj{&A?lwOwrVX4@d66vLVyj1H@i}VD2YXd)n03?U5?cKtFz4 zW#@+MLeDVP>fY0F2IzT;r5*MAJ2}P8Z{g3utX0<+ZdAC)Tvm-4uN!I7|BTw&G%RQn zR+A5VFx(}r<1q9^N40XzP=Jp?i=jlS7}T~tB4CsWx!XbiHSm zLu}yar%t>-3jlutK=wdZhES->*1X({YI;DN?6R=C*{1U6%wG`0>^?u}h0hhqns|SeTmV=s;Gxx5F9DtK>{>{f-`SpJ`dO26Ujk?^%ucsuCPe zIUk1(@I3D^7{@jmXO2@<84|}`tDjB}?S#k$ik;jC))BH8>8mQWmZ zF#V|$gW|Xc_wmmkoI-b5;4AWxkA>>0t4&&-eC-J_iP(tLT~c6*(ZnSFlhw%}0IbiJ ztgnrZwP{RBd(6Ds`dM~k;rNFgkbU&Yo$KR#q&%Kno^YXF5ONJwGwZ*wEr4wYkGiXs z$&?qX!H5sV*m%5t@3_>ijaS5hp#^Pu>N_9Q?2grdNp({IZnt|P9Xyh);q|BuoqeUJ zfk(AGX4odIVADHEmozF|I{9j>Vj^jCU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;mVJXM1V0;F}y9F29ob51f;;+)t&7l30gloMMHPTuod530FC}j^4#qOJV%5!&e!H9#!N&XQvs5{R zD_FOomd-uk@?_JiWP%&nQ_myBlM6so1Ffa1aaL7B`!ZTXPg_S%TUS*>M^8iJRj1*~ e{{%>Z1YfTk|3C04d;8A^0$7;Zm{b|L#{L(;l>}-4 literal 0 HcmV?d00001 diff --git a/JUNK/OO/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/JUNK/OO/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..efc028a636dd690a51db5a525cf781a5a7daba68 GIT binary patch literal 2555 zcmVDi>vW`@Y|P=j^x3Ifn%y?#weBmhZgZ z^Srn3`_5s_nkW1KfDd9V!jFD>F_Mc=&(D`S9F8`G9j`|SbWPvU-)IaU`}$WdghKD(z^U%DuFl=dhBq1 zV2N08FaBOdb12Qd668Nb;&Z~}bITyD2yV;4Q;V)Yd}0yejcD*w$?M!}^D9N(BLyEz zzdw5PC}r6q#BPAbGB|lDe_=J@3Wft_XJ;=W1)n8}5Q_(meMaO(qlBrMNwAM~()TMt z7``0qU^YGKgUvTFF>zWD;p2?}U+(!oOP=>E(#D=LI9;^|21mP}Sb%-B3r<$-f`)GE zf+ENH9giPBhLMqxk3?>Z_Ib>|pGpO*ls1Edc1SPZ4+Zs6n5(m@o)w`qhVIR+3x!nc z2QWA^sF+UVL`bPYG*m}z-@eUAx}Y&)U4(ZX!1ID&B)9UZ-m)SmI=x*&DX z(4U0VQSCNkV`Ff+G6~M!-Uofd_rTVE5zbccg%jm(Lo!1!!}0Rp$Ve*N38}aK2$p*n zpm(?p)9??FQ;`7UThq+UOtDt(yU340PTgTf-cvxbAYdW+ zodS8MfJB=CGHd^~s0fLZ-EJ=tYQaZdAO;5qU&BEYQVUZvM7db#>3OfcuPlI&kC9O8 zXc8ynO6$TzSy@?tytqki3G?eco<8$hd0*Xm)s6T`#OF=Nz|?XUQmTHh=zTGLKE-+| z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^YwtZjYIeOvVLey#>@$UzIciJ#x0pJLFg=8UaZv%-&?Yzp7gWNIo_x^(d75=x2c zv|LQ`HrKP(8TqFxTiP5gdT2>aTN0S7XW*pilASS$UkJ2*n+==D)0mgTGxv43t61fr z47GkfMnD-zSH@|mZ26r*d3WEtr+l-xH@L}BM)~ThoMvKqGw=Ifc}BdkL$^wC}=(XSf4YpG;sA9#OSJf)V=rs#Wq$?Wj+nTlu$YXn yn3SQon5>kvtkl(BT2@T#Mvca!|08g9w{vm``2PjZHg=b<1c17-HkzPl9sXa)&-Ts$ literal 0 HcmV?d00001 diff --git a/JUNK/OO/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/JUNK/OO/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..3af2608a4492ef9ae63a77ec3305aedda89594cb GIT binary patch literal 6114 zcmV<87aiz{P)QBg$Z&8YKy<2dSjG6I2&!iu7JRdT!gcBlJx2NL9-^PTGD_Ptf# z_t*dbRdw&}d+xcr-QAko7-Mb(cL9%PAop{-%ba$?L0~%p4=0Y}p*W8FU1n`tILPv} zML2!uMd(K8O&CZREHF@fhVQ(Z5yVrJcYBD!LfyzFt;&e2oN5Pm5Z@1b~qKj96+4}@|h;R-VA2(=2-37BtnR`#_JMV#vgaqj!A)$dLw zzAqt=kf%brlHdkMtlkP5%mgwQBTv+&?;R(E^s|ch{RoQ*)slEY&`lQ-Zm%FW<@tmV z)uL|w%v_~goAvXG*IfwH2{j7hrMtKlq}vjs(Nzf{YD8VTsI{f7SiPs>{X2v+3gRt% zb1Q)~2q^^WJXX;T&sN_Xm~Vh zb#=9En0OP&wxC@%Z{GYqE-tQJs}Mm3TMTBXa{GnLsc$2`UQ2AK7a~NTIdi77l7ri6 z`43X1QUv+6ZQSM9m9|2JpMU;2wWOq^>uu=?@`M*IT!7^#gZw+m<=EqrAj0+Q*Hg$H zJ$Oq+P^6h2REa1@$fx}f$avWbNp+}hvdvenT!~)3e7W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*Vc(wiw)??9pO_&wglHSm`HeX;J|^u4+seOf(AMpl9G~+;;Mr3@^ZewE&p3UtUNJm zn^>dZSr?w~!ynRDSy`W-pI@1roO~3=#yM~lW29pNtM``b5s=k5x!TRq|b4{^B1?GF9`<{9 literal 0 HcmV?d00001 diff --git a/JUNK/OO/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/JUNK/OO/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..324e72cdd7480cb983fa1bcc7ce686e51ef87fe7 GIT binary patch literal 7718 zcmZ{JWl)?=u?hpbj?h-6mfK3P*Eck~k0Tzeg5-hkABxtZea0_k$f-mlF z0S@Qqtva`>x}TYzc}9LrO?P#qj+P1@HZ?W?0C;Muih9o&|G$cb@ocx1*PEUJ%~tM} z901hB;rx4#{@jOHs_MN00ADr$2n+#$yJuJ64gh!x0KlF(07#?(0ENrf7G3D`0EUHz zisCaq%dJ9dz%zhdRNuG*01nCjDhiPCl@b8xIMfv7^t~4jVRrSTGYyZUWqY@yW=)V_ z&3sUP1SK9v1f{4lDSN(agrKYULc;#EGDVeU*5b@#MOSY5JBn#QG8wqxQh+mdR638{mo5f>O zLUdZIPSjFk0~F26zDrM3y_#P^P91oWtLlPaZrhnM$NR%qsbHHK#?fN?cX?EvAhY1Sr9A(1;Kw4@87~|;2QP~ z(kKOGvCdB}qr4m#)1DwQFlh^NdBZvNLkld&yg%&GU`+boBMsoj5o?8tVuY^b0?4;E zsxoLxz8?S$y~a~x0{?dqk+6~Dd(EG7px_yH(X&NX&qEtHPUhu*JHD258=5$JS12rQ zcN+7p>R>tbFJ3NzEcRIpS98?}YEYxBIA8}1Y8zH9wq0c{hx+EXY&ZQ!-Hvy03X zLTMo4EZwtKfwb294-cY5XhQRxYJSybphcrNJWW2FY+b?|QB^?$5ZN=JlSs9Og(;8+ z*~-#CeeEOxt~F#aWn8wy-N_ilDDe_o+SwJD>4y?j5Lpj z2&!EX)RNxnadPBAa?fOj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diff --git a/JUNK/OO/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/JUNK/OO/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..9bec2e623103ac9713b00cad8502a057c1efda61 GIT binary patch literal 10056 zcmV-OC%4#%P)f{b8~La&ABzzjS$j|sySB+3lg7e=Ipr#6B0nslBeFh90 zSSvo;k;;{-H`UWrL#ckvHI)CYH~&mWOOQywast)FplM+W82a~aRKuwzQB9{>M-@hu zN|i@dN_B^-lB$~2Zq@v6clc-W_;w$o0*U~HsH7SRTub^rz-g7#hsU6Ec|iLuRk{&0*aR?Y!eR?l3@CnX($h`nZRl-$kvK*5?~ zZ16HwhzvM2O&AfiDtMnXb6O*rSV!{y6<#yBUtN{Gt}WTft+ja2;c=0? zpD8ihO(mmpSmuU{Nzy+v<@)e}D+u!UeW{|1td0{J)A5n$D)d=jxl+e{e+xpqud1qg zgZ{f*Vs&bqkXUwW5^Gfc%P+sYDc83TLcHVSv^vUIqsq!kU)rV3?(4Wnl4Z4`4c{$E z&7HB1eVH1|`tRPoyXVZAGp+B-R9^&o6%`d-__PYA%TmFm-Me=$Av-&}>wOhmi>u+z zojWKDW^s7#IR{>G-9yLHnCNstK|%lf!V-xF&_)fS?~9!9I1Hkq!otEKO&TI$LTO{3 zrSGrufX4}sgCL?7zvSGxb3>b?JCnFA%-Ol^?c0q!osAUQcX;~Q0G zCTOO97KOrVN=*Pmr_n5qT)K3L?1=RvOJc|CA=+~MD{`gea+7yu!gXD_c8RP{{69TB z{?T4!TZ}Jldy!HA=_ja_(oL(?KGi6KYNNO(O353e!UA2se3`@_k0vXlKG6fTG;Sh^ z$lAhOSyQ$`a8GDMSms*ly1exOE!9jW3CUX4b_D@qV}oN}ym&E=j#-NakB4||p&1>- z8A`=HQsL^P7YsRl`ZU=WwUz{EC+Q&yOqfj06`f*Mswr9_VPSJGX0QuFz_T!NEZGye znq+5Zv$iW8>tT!lEp=t{cs$gyL4#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R3;+v@Y?UJ=O_$IN)$L*Fu!axdK1vGfa{-`#RhEm2HXObZ`0G#>Yz_g zg#*HqIRdsKJ?x?d3-5OS=0aPg$DE-9e;-6bAGx64j4}WCGe^UOmue)!Sd)oES6PAu zZZEgMs1@*@?ry{RIVRMyxTK`sIJ?y!x!X!~djuWN$?NPDcy5v{& z!LDd9Q_G>xXVD8dYv z85kIz-Y%CIXINf2C9g}WgxN~2t$M087;`7KU|B!Y?j!hA+tGo_Eg(jZy@4t15 z>-BN}4Gpj#@8fEzF`r%r-k(7^Rw~BQIlxNa(ht+v)Rx>3bi8!QRev}JNoC@=l6Qqv zcShO+EuHMRt*tHpF9bKG8)y*wfbeDR-yR-%9GY2KZNK5F;(?zdfMGJi7x;xiDjjrB z8-#I&`#ep-_6e-yX(1o!*V*H*pL`p9SJK1zId0F8?d2n51Ub4=B;UsCeMSN)P7d79G#XB(mxS>G zF0TaP3?K~11V!Gn#qN6H9EW%>&0$})XijA?@nMYD{-K06@p0g_^QjHvTDx{E_`x8t ztW?gKO2GS&yjb*MOjovn2ssPup~n*}nW1#B^>Dua@W5z~km(ENNMcO-wsr;onLMfo ziEw=ATF!d%BibpC0H+k*punkbRklp|*QyQZeDr6NuyqAm{*v!VU8F}c27KY3OI{ww z@QlC0pEsa66gSHd--B(AYo<1v1Rugf&!-T6MhGyTBpUr9}NwYYI zBY~zd6KSXg?eD_at<(P3Hu2Y*I(YNt->t<^u& + + #3F51B5 + #303F9F + #FF4081 + diff --git a/JUNK/OO/app/src/main/res/values/strings.xml b/JUNK/OO/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..9b3d01c --- /dev/null +++ b/JUNK/OO/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + OO + diff --git a/JUNK/OO/app/src/main/res/values/styles.xml b/JUNK/OO/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..5885930 --- /dev/null +++ b/JUNK/OO/app/src/main/res/values/styles.xml @@ -0,0 +1,11 @@ + + + + + + diff --git a/JUNK/OO/app/src/test/java/com/example/tejas/oo/ExampleUnitTest.java b/JUNK/OO/app/src/test/java/com/example/tejas/oo/ExampleUnitTest.java new file mode 100644 index 0000000..e869d97 --- /dev/null +++ b/JUNK/OO/app/src/test/java/com/example/tejas/oo/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.example.tejas.oo; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() throws Exception { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/JUNK/OO/build.gradle b/JUNK/OO/build.gradle new file mode 100644 index 0000000..02b027a --- /dev/null +++ b/JUNK/OO/build.gradle @@ -0,0 +1,33 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.3' + + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} + + +dependencies { + compile 'com.android.support:appcompat-v7:22.1.1' + compile 'com.github.pires:obd-java-api:1.0-RC16' + compile 'org.roboguice:roboguice:3.+' + provided 'org.roboguice:roboblender:3.+' + compile 'com.squareup.retrofit:retrofit:1.9.0' +} diff --git a/JUNK/OO/gradle.properties b/JUNK/OO/gradle.properties new file mode 100644 index 0000000..aac7c9b --- /dev/null +++ b/JUNK/OO/gradle.properties @@ -0,0 +1,17 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true diff --git a/JUNK/OO/gradle/wrapper/gradle-wrapper.jar b/JUNK/OO/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..13372aef5e24af05341d49695ee84e5f9b594659 GIT binary patch literal 53636 zcmafaW0a=B^559DjdyHo$F^PVt zzd|cWgMz^T0YO0lQ8%TE1O06v|NZl~LH{LLQ58WtNjWhFP#}eWVO&eiP!jmdp!%24 z{&z-MK{-h=QDqf+S+Pgi=_wg$I{F28X*%lJ>A7Yl#$}fMhymMu?R9TEB?#6@|Q^e^AHhxcRL$z1gsc`-Q`3j+eYAd<4@z^{+?JM8bmu zSVlrVZ5-)SzLn&LU9GhXYG{{I+u(+6ES+tAtQUanYC0^6kWkks8cG;C&r1KGs)Cq}WZSd3k1c?lkzwLySimkP5z)T2Ox3pNs;PdQ=8JPDkT7#0L!cV? zzn${PZs;o7UjcCVd&DCDpFJvjI=h(KDmdByJuDYXQ|G@u4^Kf?7YkE67fWM97kj6F z973tGtv!k$k{<>jd~D&c(x5hVbJa`bILdy(00%lY5}HZ2N>)a|))3UZ&fUa5@uB`H z+LrYm@~t?g`9~@dFzW5l>=p0hG%rv0>(S}jEzqQg6-jImG%Pr%HPtqIV_Ym6yRydW z4L+)NhcyYp*g#vLH{1lK-hQQSScfvNiNx|?nSn-?cc8}-9~Z_0oxlr~(b^EiD`Mx< zlOLK)MH?nl4dD|hx!jBCIku-lI(&v~bCU#!L7d0{)h z;k4y^X+=#XarKzK*)lv0d6?kE1< zmCG^yDYrSwrKIn04tG)>>10%+ zEKzs$S*Zrl+GeE55f)QjY$ zD5hi~J17k;4VSF_`{lPFwf^Qroqg%kqM+Pdn%h#oOPIsOIwu?JR717atg~!)*CgXk zERAW?c}(66rnI+LqM^l7BW|9dH~5g1(_w$;+AAzSYlqop*=u5}=g^e0xjlWy0cUIT7{Fs2Xqx*8% zW71JB%hk%aV-wjNE0*$;E-S9h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properties new file mode 100644 index 0000000..2d4ab96 --- /dev/null +++ b/JUNK/OO/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu Jul 06 10:51:22 IST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/JUNK/OO/gradlew b/JUNK/OO/gradlew new file mode 100644 index 0000000..9d82f78 --- /dev/null +++ b/JUNK/OO/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/JUNK/OO/gradlew.bat b/JUNK/OO/gradlew.bat new file mode 100644 index 0000000..8a0b282 --- /dev/null +++ b/JUNK/OO/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/JUNK/OO/settings.gradle b/JUNK/OO/settings.gradle new file mode 100644 index 0000000..e7b4def --- /dev/null +++ b/JUNK/OO/settings.gradle @@ -0,0 +1 @@ +include ':app' diff --git a/JUNK/SocketIO/.gitignore b/JUNK/SocketIO/.gitignore new file mode 100644 index 0000000..39fb081 --- /dev/null +++ b/JUNK/SocketIO/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.externalNativeBuild diff --git a/JUNK/SocketIO/.idea/compiler.xml b/JUNK/SocketIO/.idea/compiler.xml new file mode 100644 index 0000000..96cc43e --- /dev/null +++ b/JUNK/SocketIO/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JUNK/SocketIO/.idea/copyright/profiles_settings.xml b/JUNK/SocketIO/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/JUNK/SocketIO/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/JUNK/SocketIO/.idea/gradle.xml b/JUNK/SocketIO/.idea/gradle.xml new file mode 100644 index 0000000..7ac24c7 --- /dev/null +++ b/JUNK/SocketIO/.idea/gradle.xml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/JUNK/SocketIO/.idea/misc.xml b/JUNK/SocketIO/.idea/misc.xml new file mode 100644 index 0000000..5d19981 --- /dev/null +++ b/JUNK/SocketIO/.idea/misc.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JUNK/SocketIO/.idea/modules.xml b/JUNK/SocketIO/.idea/modules.xml new file mode 100644 index 0000000..f446d9b --- /dev/null +++ b/JUNK/SocketIO/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/JUNK/SocketIO/.idea/runConfigurations.xml b/JUNK/SocketIO/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/JUNK/SocketIO/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/JUNK/SocketIO/app/.gitignore b/JUNK/SocketIO/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/JUNK/SocketIO/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/JUNK/SocketIO/app/build.gradle b/JUNK/SocketIO/app/build.gradle new file mode 100644 index 0000000..a620707 --- /dev/null +++ b/JUNK/SocketIO/app/build.gradle @@ -0,0 +1,35 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 26 + buildToolsVersion "26.0.0" + defaultConfig { + applicationId "com.example.tejas.socketio" + minSdkVersion 23 + targetSdkVersion 26 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + exclude group: 'com.android.support', module: 'support-annotations' + }) + compile 'com.android.support:appcompat-v7:26.+' + compile 'com.android.support.constraint:constraint-layout:1.0.2' + testCompile 'junit:junit:4.12' + compile 'com.github.nkzawa:socket.io-client:0.3.0' + compile ('io.socket:socket.io-client:0.8.3') { + // excluding org.json which is provided by Android + exclude group: 'org.json', module: 'json' + } +} diff --git a/JUNK/SocketIO/app/proguard-rules.pro b/JUNK/SocketIO/app/proguard-rules.pro new file mode 100644 index 0000000..6733beb --- /dev/null +++ b/JUNK/SocketIO/app/proguard-rules.pro @@ -0,0 +1,25 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in C:\Users\Tejas\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/JUNK/SocketIO/app/src/androidTest/java/com/example/tejas/socketio/ExampleInstrumentedTest.java b/JUNK/SocketIO/app/src/androidTest/java/com/example/tejas/socketio/ExampleInstrumentedTest.java new file mode 100644 index 0000000..d84e358 --- /dev/null +++ b/JUNK/SocketIO/app/src/androidTest/java/com/example/tejas/socketio/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.tejas.socketio; + +import android.content.Context; +import android.support.test.InstrumentationRegistry; +import android.support.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumentation test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() throws Exception { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getTargetContext(); + + assertEquals("com.example.tejas.socketio", appContext.getPackageName()); + } +} diff --git a/JUNK/SocketIO/app/src/main/AndroidManifest.xml b/JUNK/SocketIO/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..bbdbdf8 --- /dev/null +++ b/JUNK/SocketIO/app/src/main/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JUNK/SocketIO/app/src/main/java/com/example/tejas/socketio/MainActivity.java b/JUNK/SocketIO/app/src/main/java/com/example/tejas/socketio/MainActivity.java new file mode 100644 index 0000000..6fce256 --- /dev/null +++ b/JUNK/SocketIO/app/src/main/java/com/example/tejas/socketio/MainActivity.java @@ -0,0 +1,36 @@ +package com.example.tejas.socketio; + +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.widget.Toast; + +import com.github.nkzawa.socketio.client.IO; +import com.github.nkzawa.socketio.client.Socket; + +import java.net.URISyntaxException; + +import io.socket.emitter.Emitter; + + +public class MainActivity extends AppCompatActivity { + String Test; + + + + + private Socket mSocket; + { + try { + mSocket = IO.socket("http://192.168.1.9:3000"); + + } catch (URISyntaxException e) {} + } + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + Toast.makeText(this, "HERE", Toast.LENGTH_SHORT).show(); + mSocket.connect(); + + } + +} diff --git a/JUNK/SocketIO/app/src/main/java/com/example/tejas/socketio/test.java b/JUNK/SocketIO/app/src/main/java/com/example/tejas/socketio/test.java new file mode 100644 index 0000000..d647046 --- /dev/null +++ b/JUNK/SocketIO/app/src/main/java/com/example/tejas/socketio/test.java @@ -0,0 +1,17 @@ +package com.example.tejas.socketio; + +import com.github.nkzawa.socketio.client.IO; +import com.github.nkzawa.socketio.client.Socket; + +import java.net.URISyntaxException; + +/** + * Created by Tejas on 07-07-2017. + */ + +public class test { + Socket mSocket = IO.socket("192.168.1.9:3000"); + + public test() throws URISyntaxException { + } +} diff --git a/JUNK/SocketIO/app/src/main/res/layout/activity_main.xml b/JUNK/SocketIO/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..bf37ef1 --- /dev/null +++ b/JUNK/SocketIO/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/JUNK/SocketIO/app/src/main/res/mipmap-hdpi/ic_launcher.png b/JUNK/SocketIO/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..cde69bcccec65160d92116f20ffce4fce0b5245c GIT binary patch literal 3418 zcmZ{nX*|@A^T0p5j$I+^%FVhdvMbgt%d+mG98ubwNv_tpITppba^GiieBBZGI>I89 zGgm8TA>_)DlEu&W;s3#ZUNiH4&CF{a%siTjzG;eOzQB6{003qKeT?}z_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launcher_round.png b/JUNK/SocketIO/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..efc028a636dd690a51db5a525cf781a5a7daba68 GIT binary patch literal 2555 zcmVDi>vW`@Y|P=j^x3Ifn%y?#weBmhZgZ z^Srn3`_5s_nkW1KfDd9V!jFD>F_Mc=&(D`S9F8`G9j`|SbWPvU-)IaU`}$WdghKD(z^U%DuFl=dhBq1 zV2N08FaBOdb12Qd668Nb;&Z~}bITyD2yV;4Q;V)Yd}0yejcD*w$?M!}^D9N(BLyEz zzdw5PC}r6q#BPAbGB|lDe_=J@3Wft_XJ;=W1)n8}5Q_(meMaO(qlBrMNwAM~()TMt z7``0qU^YGKgUvTFF>zWD;p2?}U+(!oOP=>E(#D=LI9;^|21mP}Sb%-B3r<$-f`)GE zf+ENH9giPBhLMqxk3?>Z_Ib>|pGpO*ls1Edc1SPZ4+Zs6n5(m@o)w`qhVIR+3x!nc z2QWA^sF+UVL`bPYG*m}z-@eUAx}Y&)U4(ZX!1ID&B)9UZ-m)SmI=x*&DX z(4U0VQSCNkV`Ff+G6~M!-Uofd_rTVE5zbccg%jm(Lo!1!!}0Rp$Ve*N38}aK2$p*n zpm(?p)9??FQ;`7UThq+UOtDt(yU340PTgTf-cvxbAYdW+ zodS8MfJB=CGHd^~s0fLZ-EJ=tYQaZdAO;5qU&BEYQVUZvM7db#>3OfcuPlI&kC9O8 zXc8ynO6$TzSy@?tytqki3G?eco<8$hd0*Xm)s6T`#OF=Nz|?XUQmTHh=zTGLKE-+| z`R_lmJHKZj zYHDgW;R5zROF(6Nf!D;<$-4^>$-4vuLPcAirU0zhk=)$eH)H`8i{&*f0hE))jVY>R zmqT9B`&@vr{-k0Zhyu=?I~O1eC@L!YJ}zQ*H377xy<8iOlOj14B;uwl(JEnwjAJr_ zIFPu-00|bojChNVBak8YiwHKSngDD7gUQLsn`8k84<3AZYHCWgh-vZ4u!X_jGYxR) zq8|Q1$V6o6;p0n)Y&{&#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YXn yn3SQon5>kvtkl(BT2@T#Mvca!|08g9w{vm``2PjZHg=b<1c17-HkzPl9sXa)&-Ts$ literal 0 HcmV?d00001 diff --git a/JUNK/SocketIO/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/JUNK/SocketIO/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..3af2608a4492ef9ae63a77ec3305aedda89594cb GIT binary patch literal 6114 zcmV<87aiz{P)QBg$Z&8YKy<2dSjG6I2&!iu7JRdT!gcBlJx2NL9-^PTGD_Ptf# z_t*dbRdw&}d+xcr-QAko7-Mb(cL9%PAop{-%ba$?L0~%p4=0Y}p*W8FU1n`tILPv} zML2!uMd(K8O&CZREHF@fhVQ(Z5yVrJcYBD!LfyzFt;&e2oN5Pm5Z@1b~qKj96+4}@|h;R-VA2(=2-37BtnR`#_JMV#vgaqj!A)$dLw zzAqt=kf%brlHdkMtlkP5%mgwQBTv+&?;R(E^s|ch{RoQ*)slEY&`lQ-Zm%FW<@tmV z)uL|w%v_~goAvXG*IfwH2{j7hrMtKlq}vjs(Nzf{YD8VTsI{f7SiPs>{X2v+3gRt% zb1Q)~2q^^WJXX;T&sN_Xm~Vh zb#=9En0OP&wxC@%Z{GYqE-tQJs}Mm3TMTBXa{GnLsc$2`UQ2AK7a~NTIdi77l7ri6 z`43X1QUv+6ZQSM9m9|2JpMU;2wWOq^>uu=?@`M*IT!7^#gZw+m<=EqrAj0+Q*Hg$H zJ$Oq+P^6h2REa1@$fx}f$avWbNp+}hvdvenT!~)3e7WZ>$&QpcFrEB6N8An?S5|d~ zB^5-n^6EnVzO|5VtXly~JQKl6t4`ZnH?qHmS_oEMUA;k(9l5u-^-~3>C<3lsKL5sz z8*E#~Y!;d{mW8E%&1x=JwThmAI-oA!r+v=m8+=*h@o#ut?Trbv)l*PrWo2c7E!qoY zv?ucapvd#>&UUU|y~?7Ft!1Hy#&Qu1ry?9_Xo~@Lh|Ar;$)A_t%k~~!$?N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xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..324e72cdd7480cb983fa1bcc7ce686e51ef87fe7 GIT binary patch literal 7718 zcmZ{JWl)?=u?hpbj?h-6mfK3P*Eck~k0Tzeg5-hkABxtZea0_k$f-mlF z0S@Qqtva`>x}TYzc}9LrO?P#qj+P1@HZ?W?0C;Muih9o&|G$cb@ocx1*PEUJ%~tM} z901hB;rx4#{@jOHs_MN00ADr$2n+#$yJuJ64gh!x0KlF(07#?(0ENrf7G3D`0EUHz zisCaq%dJ9dz%zhdRNuG*01nCjDhiPCl@b8xIMfv7^t~4jVRrSTGYyZUWqY@yW=)V_ z&3sUP1SK9v1f{4lDSN(agrKYULc;#EGDVeU*5b@#MOSY5JBn#QG8wqxQh+mdR638{mo5f>O zLUdZIPSjFk0~F26zDrM3y_#P^P91oWtLlPaZrhnM$NR%qsbHHK#?fN?cX?EvAhY1Sr9A(1;Kw4@87~|;2QP~ z(kKOGvCdB}qr4m#)1DwQFlh^NdBZvNLkld&yg%&GU`+boBMsoj5o?8tVuY^b0?4;E zsxoLxz8?S$y~a~x0{?dqk+6~Dd(EG7px_yH(X&NX&qEtHPUhu*JHD258=5$JS12rQ zcN+7p>R>tbFJ3NzEcRIpS98?}YEYxBIA8}1Y8zH9wq0c{hx+EXY&ZQ!-Hvy03X zLTMo4EZwtKfwb294-cY5XhQRxYJSybphcrNJWW2FY+b?|QB^?$5ZN=JlSs9Og(;8+ z*~-#CeeEOxt~F#aWn8wy-N_ilDDe_o+SwJD>4y?j5Lpj z2&!EX)RNxnadPBAa?fOj5D1C{l1E0X?&G3+ckcVfk`?%2FTsoUf4@~eaS#th=zq7v zMEJR@1T?Pi4;$xiPv`3)9rsrbVUH&b0e2{YTEG%;$GGzKUKEim;R6r>F@Q-}9JR-< zOPpQI>W0Vt6&7d?~$d&}chKTr_rELu} zWY;KTvtpJFr?P~ReHL4~2=ABn1`GN4Li%OI_1{mMRQi1Bf?+^Va?xdn4>h)Bq#ZRK zY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GgQo9nNe6S#MZnyce_na@78ZnpwFenVafZC3N2lc5Jk-@V`{|l zhaF`zAL)+($xq8mFm{7fXtHru+DANoGz-A^1*@lTnE;1?03lz8kAnD{zQU=Pb^3f` zT5-g`z5|%qOa!WTBed-8`#AQ~wb9TrUZKU)H*O7!LtNnEd!r8!Oda)u!Gb5P`9(`b z`lMP6CLh4OzvXC#CR|@uo$EcHAyGr=)LB7)>=s3 zvU;aR#cN3<5&CLMFU@keW^R-Tqyf4fdkOnwI(H$x#@I1D6#dkUo@YW#7MU0@=NV-4 zEh2K?O@+2e{qW^7r?B~QTO)j}>hR$q9*n$8M(4+DOZ00WXFonLlk^;os8*zI>YG#? z9oq$CD~byz>;`--_NMy|iJRALZ#+qV8OXn=AmL^GL&|q1Qw-^*#~;WNNNbk(96Tnw zGjjscNyIyM2CYwiJ2l-}u_7mUGcvM+puPF^F89eIBx27&$|p_NG)fOaafGv|_b9G$;1LzZ-1aIE?*R6kHg}dy%~K(Q5S2O6086 z{lN&8;0>!pq^f*Jlh=J%Rmaoed<=uf@$iKl+bieC83IT!09J&IF)9H)C?d!eW1UQ}BQwxaqQY47DpOk@`zZ zo>#SM@oI^|nrWm~Ol7=r`!Bp9lQNbBCeHcfN&X$kjj0R(@?f$OHHt|fWe6jDrYg3(mdEd$8P2Yzjt9*EM zLE|cp-Tzsdyt(dvLhU8}_IX&I?B=|yoZ!&<`9&H5PtApt=VUIB4l0a1NH v0SQqt3DM`an1p};^>=lX|A*k@Y-MNT^ZzF}9G-1G696?OEyXH%^Pv9$0dR%J literal 0 HcmV?d00001 diff --git a/JUNK/SocketIO/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/JUNK/SocketIO/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..9bec2e623103ac9713b00cad8502a057c1efda61 GIT binary patch literal 10056 zcmV-OC%4#%P)f{b8~La&ABzzjS$j|sySB+3lg7e=Ipr#6B0nslBeFh90 zSSvo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f2C9g}WgxN~2t$M087;`7KU|B!Y?j!hA+tGo_Eg(jZy@4t15 z>-BN}4Gpj#@8fEzF`r%r-k(7^Rw~BQIlxNa(ht+v)Rx>3bi8!QRev}JNoC@=l6Qqv zcShO+EuHMRt*tHpF9bKG8)y*wfbeDR-yR-%9GY2KZNK5F;(?zdfMGJi7x;xiDjjrB z8-#I&`#ep-_6e-yX(1o!*V*H*pL`p9SJK1zId0F8?d2n51Ub4=B;UsCeMSN)P7d79G#XB(mxS>G zF0TaP3?K~11V!Gn#qN6H9EW%>&0$})XijA?@nMYD{-K06@p0g_^QjHvTDx{E_`x8t ztW?gKO2GS&yjb*MOjovn2ssPup~n*}nW1#B^>Dua@W5z~km(ENNMcO-wsr;onLMfo ziEw=ATF!d%BibpC0H+k*punkbRklp|*QyQZeDr6NuyqAm{*v!VU8F}c27KY3OI{ww z@QlC0pEsa66gSHd--B(AYo<1v1Rugf&!-T6MhGyTBpUr9}NwYYI zBY~zd6KSXg?eD_at<(P3Hu2Y*I(YNt->t<^u& + + #3F51B5 + #303F9F + #FF4081 + diff --git a/JUNK/SocketIO/app/src/main/res/values/strings.xml b/JUNK/SocketIO/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..54a3a6d --- /dev/null +++ b/JUNK/SocketIO/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + SocketIO + diff --git a/JUNK/SocketIO/app/src/main/res/values/styles.xml b/JUNK/SocketIO/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..5885930 --- /dev/null +++ b/JUNK/SocketIO/app/src/main/res/values/styles.xml @@ -0,0 +1,11 @@ + + + + + + diff --git a/JUNK/SocketIO/app/src/test/java/com/example/tejas/socketio/ExampleUnitTest.java b/JUNK/SocketIO/app/src/test/java/com/example/tejas/socketio/ExampleUnitTest.java new file mode 100644 index 0000000..b29402e --- /dev/null +++ b/JUNK/SocketIO/app/src/test/java/com/example/tejas/socketio/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.example.tejas.socketio; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() throws Exception { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/JUNK/SocketIO/build.gradle b/JUNK/SocketIO/build.gradle new file mode 100644 index 0000000..c2eea8e --- /dev/null +++ b/JUNK/SocketIO/build.gradle @@ -0,0 +1,23 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.3' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/JUNK/SocketIO/gradle.properties b/JUNK/SocketIO/gradle.properties new file mode 100644 index 0000000..aac7c9b --- /dev/null +++ b/JUNK/SocketIO/gradle.properties @@ -0,0 +1,17 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true diff --git a/JUNK/SocketIO/gradle/wrapper/gradle-wrapper.jar b/JUNK/SocketIO/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..13372aef5e24af05341d49695ee84e5f9b594659 GIT binary patch literal 53636 zcmafaW0a=B^559DjdyHo$F^PVt zzd|cWgMz^T0YO0lQ8%TE1O06v|NZl~LH{LLQ58WtNjWhFP#}eWVO&eiP!jmdp!%24 z{&z-MK{-h=QDqf+S+Pg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+{(g0+RDnz!TR^mxSLu_y#SDVKrj8i zA^hi6>jMGM;`$9Vfb-Yf!47b)Ow`2OKtNB=z|Kxa$5O}WPo;(Dc^`q(7X8kkeFyO8 z{XOq^07=u|7*P2`m;>PIFf=i80MKUxsN{d2cX0M+REsE*20+WQ79T9&cqT>=I_U% z{=8~^Isg(Nzo~`4iQfIb_#CVCD>#5h>=-Z#5dH}WxYzn%0)GAm6L2WdUdP=0_h>7f z(jh&7%1i(ZOn+}D8$iGK4Vs{pmHl_w4Qm-46H9>4^{3dz^DZDh+dw)6Xd@CpQNK$j z{CU;-cmpK=egplZ3y3%y=sEnCJ^eYVKXzV8H2_r*fJ*%*B;a1_lOpt6)IT1IAK2eB z{rie|uDJUrbgfUE>~C>@RO|m5ex55F{=~Bb4Cucp{ok7Yf9V}QuZ`#Gc|WaqsQlK- zKaV)iMRR__&Ak2Z=IM9R9g5$WM4u{a^C-7uX*!myEym z#_#p^T!P~#Dx$%^K>Y_nj_3J*E_LwJ60-5Xu=LkJAwcP@|0;a&+|+ZX`Jbj9P5;T% z|KOc}4*#4o{U?09`9Hz`Xo-I!P=9XfIrr*MQ}y=$!qgv?_J38^bNb4kM&_OVg^_=Eu-qG5U(fw0KMgH){C8pazq~51rN97hf#20-7=aK0)N|UM H-+%o-(+5aQ literal 0 HcmV?d00001 diff --git a/JUNK/SocketIO/gradle/wrapper/gradle-wrapper.properties b/JUNK/SocketIO/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..443aa9e --- /dev/null +++ b/JUNK/SocketIO/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jul 07 22:59:42 IST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/JUNK/SocketIO/gradlew b/JUNK/SocketIO/gradlew new file mode 100644 index 0000000..9d82f78 --- /dev/null +++ b/JUNK/SocketIO/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/JUNK/SocketIO/gradlew.bat b/JUNK/SocketIO/gradlew.bat new file mode 100644 index 0000000..8a0b282 --- /dev/null +++ b/JUNK/SocketIO/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/JUNK/SocketIO/settings.gradle b/JUNK/SocketIO/settings.gradle new file mode 100644 index 0000000..e7b4def --- /dev/null +++ b/JUNK/SocketIO/settings.gradle @@ -0,0 +1 @@ +include ':app' diff --git a/JUNK/WebSocket-for-Python-master/.gitignore b/JUNK/WebSocket-for-Python-master/.gitignore new file mode 100644 index 0000000..9e00178 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/.gitignore @@ -0,0 +1,5 @@ +build +*.egg-info +*.pyc +.tox +docs/_build/ diff --git a/JUNK/WebSocket-for-Python-master/.travis.yml b/JUNK/WebSocket-for-Python-master/.travis.yml new file mode 100644 index 0000000..30c4074 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/.travis.yml @@ -0,0 +1,20 @@ +language: python + +python: + - 2.7 + - 3.3 + - 3.4 + - 3.5 + +before_install: + - sudo apt-get install python-dev libevent-dev + - pip install Cython + +install: + - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install -r requirements/py2kreqs.txt; fi + - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then pip install -r requirements/py3kreqs.txt; fi + - python setup.py install + +script: + - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then py.test -v; fi + - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then py.test -v; fi diff --git a/JUNK/WebSocket-for-Python-master/CHANGELOG.md b/JUNK/WebSocket-for-Python-master/CHANGELOG.md new file mode 100644 index 0000000..d9b07e4 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/CHANGELOG.md @@ -0,0 +1,313 @@ +# Change Log + +## [0.4.2](https://github.com/Lawouach/WebSocket-for-Python/tree/0.4.2) (2017-03-29) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/0.4.1...0.4.2) + +**Merged pull requests:** + +- Block on receiving from SSL socket [\#212](https://github.com/Lawouach/WebSocket-for-Python/pull/212) ([awelkie](https://github.com/awelkie)) + +## [0.4.1](https://github.com/Lawouach/WebSocket-for-Python/tree/0.4.1) (2017-03-26) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/0.4.0...0.4.1) + +**Merged pull requests:** + +- fixes parsed hostname [\#210](https://github.com/Lawouach/WebSocket-for-Python/pull/210) ([isubas](https://github.com/isubas)) + +## [0.4.0](https://github.com/Lawouach/WebSocket-for-Python/tree/0.4.0) (2017-03-24) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/0.3.5...0.4.0) + +**Implemented enhancements:** + +- exception not catch in websocket.py always [\#70](https://github.com/Lawouach/WebSocket-for-Python/issues/70) + +**Fixed bugs:** + +- Last send never happens [\#167](https://github.com/Lawouach/WebSocket-for-Python/issues/167) + +**Closed issues:** + +- PyPI latest release 0.3.5 does not include \#205 and therefore breaks with cherrypy [\#209](https://github.com/Lawouach/WebSocket-for-Python/issues/209) +- Unable to reconnect [\#207](https://github.com/Lawouach/WebSocket-for-Python/issues/207) +- CherryPy does not use its own wsgiserver anymore, which ws4py depended on [\#205](https://github.com/Lawouach/WebSocket-for-Python/issues/205) +- py2exe / python2.7 / syntax error in "yield from" lines [\#202](https://github.com/Lawouach/WebSocket-for-Python/issues/202) +- Missing 0.3.5 changelog and tag [\#192](https://github.com/Lawouach/WebSocket-for-Python/issues/192) +- ws4py 0.3.5 doesn't receive all messages over wss [\#191](https://github.com/Lawouach/WebSocket-for-Python/issues/191) +- SSL: received\_message not getting called [\#183](https://github.com/Lawouach/WebSocket-for-Python/issues/183) +- Python 2.6 support [\#182](https://github.com/Lawouach/WebSocket-for-Python/issues/182) +- Overridden close\(\) not called under windows [\#178](https://github.com/Lawouach/WebSocket-for-Python/issues/178) +- Enabling cpstats causes ws4py to crash [\#177](https://github.com/Lawouach/WebSocket-for-Python/issues/177) +- Only support Python 3.0+ ? [\#175](https://github.com/Lawouach/WebSocket-for-Python/issues/175) +- IOError\(interrupted system call\) on dropping privilages [\#172](https://github.com/Lawouach/WebSocket-for-Python/issues/172) +- error: configure\_logger\(stdout=False, filepath="ws4py.log"\) [\#171](https://github.com/Lawouach/WebSocket-for-Python/issues/171) +- Python 3.4 and gevent 1.1 [\#170](https://github.com/Lawouach/WebSocket-for-Python/issues/170) +- Is it possible to extract headers from WebSocketProtocol using asyncio [\#169](https://github.com/Lawouach/WebSocket-for-Python/issues/169) +- server, opened\(\) is called each time a message is send [\#162](https://github.com/Lawouach/WebSocket-for-Python/issues/162) +- tlm [\#160](https://github.com/Lawouach/WebSocket-for-Python/issues/160) +- In opened\(\), closing connection would crash the server [\#159](https://github.com/Lawouach/WebSocket-for-Python/issues/159) +- Server crashes with broken pipe if client disconnects ungracefully? [\#150](https://github.com/Lawouach/WebSocket-for-Python/issues/150) +- Client connection hangs when using Cherrypy [\#146](https://github.com/Lawouach/WebSocket-for-Python/issues/146) +- low priority: wsgiref example doesn't work [\#145](https://github.com/Lawouach/WebSocket-for-Python/issues/145) +- CherryPy: simple example of an echo server [\#140](https://github.com/Lawouach/WebSocket-for-Python/issues/140) +- WebSocketClient.closed\(\) always returns code 1006 if reason string empty. [\#137](https://github.com/Lawouach/WebSocket-for-Python/issues/137) +- Server Side Connection Drops Immediately [\#134](https://github.com/Lawouach/WebSocket-for-Python/issues/134) +- Calling WebSocketClient.terminate\(\) results in AttributeError [\#131](https://github.com/Lawouach/WebSocket-for-Python/issues/131) +- ConnectionRefusedError: \[WinError 10061\] No connection could be made because the target machine actively refused it [\#130](https://github.com/Lawouach/WebSocket-for-Python/issues/130) +- AttributeError: 'NoneType' object has no attribute 'fileno' [\#129](https://github.com/Lawouach/WebSocket-for-Python/issues/129) +- wss is always one message behind [\#128](https://github.com/Lawouach/WebSocket-for-Python/issues/128) +- Asyncio Issues [\#125](https://github.com/Lawouach/WebSocket-for-Python/issues/125) + +**Merged pull requests:** + +- change cherrypy.wsgiserver to cheroot.server [\#206](https://github.com/Lawouach/WebSocket-for-Python/pull/206) ([raven38](https://github.com/raven38)) +- This change is to address the issue with run\_forever\(\) terminating too early. [\#201](https://github.com/Lawouach/WebSocket-for-Python/pull/201) ([steowens](https://github.com/steowens)) +- Don't crash with broken pipe when trying to close a connection [\#198](https://github.com/Lawouach/WebSocket-for-Python/pull/198) ([cristi8](https://github.com/cristi8)) +- adding heartbeat for gevent\_client [\#195](https://github.com/Lawouach/WebSocket-for-Python/pull/195) ([alexmnt](https://github.com/alexmnt)) +- minor - typo [\#193](https://github.com/Lawouach/WebSocket-for-Python/pull/193) ([johnwheeler](https://github.com/johnwheeler)) +- Eliminate a protocol error when first chunk is last too. [\#186](https://github.com/Lawouach/WebSocket-for-Python/pull/186) ([plu9in](https://github.com/plu9in)) +- Allow WebSocketWSGIHandler to work even in presence of a middleware [\#185](https://github.com/Lawouach/WebSocket-for-Python/pull/185) ([bozzzzo](https://github.com/bozzzzo)) +- Give application status code 1005 when no good status code is parsed/received [\#181](https://github.com/Lawouach/WebSocket-for-Python/pull/181) ([isonmad](https://github.com/isonmad)) +- Fix server "Bad file descriptor" error under gevent 1.1, \#170 [\#180](https://github.com/Lawouach/WebSocket-for-Python/pull/180) ([hyt-hz](https://github.com/hyt-hz)) +- Version of example that doesn't need jquery, fix IOError on resume, f… [\#173](https://github.com/Lawouach/WebSocket-for-Python/pull/173) ([EternityForest](https://github.com/EternityForest)) +- Fix typo [\#161](https://github.com/Lawouach/WebSocket-for-Python/pull/161) ([hexchain](https://github.com/hexchain)) +- added a word [\#157](https://github.com/Lawouach/WebSocket-for-Python/pull/157) ([Mrmaxmeier](https://github.com/Mrmaxmeier)) +- Removed unnecessary try/except and cleaned for some PEP8 [\#155](https://github.com/Lawouach/WebSocket-for-Python/pull/155) ([warvariuc](https://github.com/warvariuc)) +- Improve Origin handling in Client [\#154](https://github.com/Lawouach/WebSocket-for-Python/pull/154) ([rdbhost](https://github.com/rdbhost)) +- Fix: closing handshake does not work correctly when reason is empty [\#149](https://github.com/Lawouach/WebSocket-for-Python/pull/149) ([schiermike](https://github.com/schiermike)) +- pass ssl\_options to SSLIOStream\(\) to ensure certificate validation works [\#147](https://github.com/Lawouach/WebSocket-for-Python/pull/147) ([szweep](https://github.com/szweep)) +- Explained why wsgiref not for produciton [\#144](https://github.com/Lawouach/WebSocket-for-Python/pull/144) ([Seanny123](https://github.com/Seanny123)) +- Added Port to Host in handshake header. [\#139](https://github.com/Lawouach/WebSocket-for-Python/pull/139) ([thiagorcdl](https://github.com/thiagorcdl)) +- Don't fail when websocket was not inited. [\#135](https://github.com/Lawouach/WebSocket-for-Python/pull/135) ([eraviart](https://github.com/eraviart)) +- ws4py/\_\_init\_\_.py: fix configure\_logger by importing loging.handlers as handlers [\#133](https://github.com/Lawouach/WebSocket-for-Python/pull/133) ([andrew-canaday](https://github.com/andrew-canaday)) + +## [0.3.5](https://github.com/Lawouach/WebSocket-for-Python/tree/0.3.5) (2014-04-01) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.3.4...0.3.5) + +**Closed issues:** + +- No longer working on Chome 34.0.1847.76 [\#124](https://github.com/Lawouach/WebSocket-for-Python/issues/124) + +## [v0.3.4](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.3.4) (2014-03-30) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.3.3...v0.3.4) + +**Fixed bugs:** + +- ws4py 0.3.3 installation broken [\#123](https://github.com/Lawouach/WebSocket-for-Python/issues/123) + +## [v0.3.3](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.3.3) (2014-03-29) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.3.2...v0.3.3) + +**Implemented enhancements:** + +- Upload releases to PyPI for compatibility with new pip versions [\#99](https://github.com/Lawouach/WebSocket-for-Python/issues/99) +- Gradually drop support for Python \<2.7 and \<3.3.2 [\#91](https://github.com/Lawouach/WebSocket-for-Python/issues/91) + +**Fixed bugs:** + +- Catch MemoryError when uploading a music file\(size: 16M\) [\#113](https://github.com/Lawouach/WebSocket-for-Python/issues/113) +- ws4py 0.2.2 no longer working on Chrome version 30 [\#108](https://github.com/Lawouach/WebSocket-for-Python/issues/108) + +**Closed issues:** + +- Exception in thread WebSocketClient during unit testing [\#122](https://github.com/Lawouach/WebSocket-for-Python/issues/122) +- TypeError: \_\_str\_\_ returned non-string \(type bytes\) [\#121](https://github.com/Lawouach/WebSocket-for-Python/issues/121) +- While using the Gevent WebSocket client an os error, OSError: \[Errno 24\] Too many open files, occurs [\#120](https://github.com/Lawouach/WebSocket-for-Python/issues/120) +- AttributeError: 'MyClient' object has no attribute '\_cleanup' [\#119](https://github.com/Lawouach/WebSocket-for-Python/issues/119) +- Message string representation does not work in Python 3 [\#117](https://github.com/Lawouach/WebSocket-for-Python/issues/117) +- Not able to install a specific version of an unsecure package [\#115](https://github.com/Lawouach/WebSocket-for-Python/issues/115) +- How to use WebSocketManager with server? [\#111](https://github.com/Lawouach/WebSocket-for-Python/issues/111) +- client: KeyboardInterrupt silently catched [\#109](https://github.com/Lawouach/WebSocket-for-Python/issues/109) +- unittests2 shouldn't be needed with python \>= 2.7 and \>= 3.2 [\#106](https://github.com/Lawouach/WebSocket-for-Python/issues/106) + +**Merged pull requests:** + +- base example documentation fix [\#118](https://github.com/Lawouach/WebSocket-for-Python/pull/118) ([husio](https://github.com/husio)) +- fix: changed gevent server to use a real gevent.pool.Pool [\#114](https://github.com/Lawouach/WebSocket-for-Python/pull/114) ([fischerq](https://github.com/fischerq)) +- Tutorial should import TornadoWebSocketClient. [\#112](https://github.com/Lawouach/WebSocket-for-Python/pull/112) ([ajdavis](https://github.com/ajdavis)) +- Fix cherrypy logging [\#107](https://github.com/Lawouach/WebSocket-for-Python/pull/107) ([UncleRus](https://github.com/UncleRus)) + +## [v0.3.2](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.3.2) (2013-09-12) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.3.0-beta...v0.3.2) + +**Implemented enhancements:** + +- Move back to unicode and byte litterals [\#100](https://github.com/Lawouach/WebSocket-for-Python/issues/100) +- remove implicit gevent monkey patching in the gevent client [\#90](https://github.com/Lawouach/WebSocket-for-Python/issues/90) +- Busy loop in SelectPoller that is consuming a lot of CPU [\#87](https://github.com/Lawouach/WebSocket-for-Python/issues/87) +- tornado expects bytes but TornadoWebSocketClient gives strings [\#71](https://github.com/Lawouach/WebSocket-for-Python/issues/71) + +**Fixed bugs:** + +- AssertionError: Header values must be strings [\#103](https://github.com/Lawouach/WebSocket-for-Python/issues/103) +- remove implicit gevent monkey patching in the gevent client [\#90](https://github.com/Lawouach/WebSocket-for-Python/issues/90) +- ws4py.server.wsgiutils.py got some error in python 3.3 [\#88](https://github.com/Lawouach/WebSocket-for-Python/issues/88) +- Busy loop in SelectPoller that is consuming a lot of CPU [\#87](https://github.com/Lawouach/WebSocket-for-Python/issues/87) +- Socket not properly closed in Win7 [\#69](https://github.com/Lawouach/WebSocket-for-Python/issues/69) + +**Closed issues:** + +- NameError: global name 'dec' is not defined \(in Python 2.7.5\) [\#102](https://github.com/Lawouach/WebSocket-for-Python/issues/102) +- Allow cherrypy users to pass in a custom poller to the manager [\#95](https://github.com/Lawouach/WebSocket-for-Python/issues/95) +- IPv6 sockets not supported [\#86](https://github.com/Lawouach/WebSocket-for-Python/issues/86) +- Support `ws+unix` scheme [\#76](https://github.com/Lawouach/WebSocket-for-Python/issues/76) +- Strange traceback with WebSocket.send [\#73](https://github.com/Lawouach/WebSocket-for-Python/issues/73) + +**Merged pull requests:** + +- fixed some old references to removed functions enc\(\) and dec\(\) [\#101](https://github.com/Lawouach/WebSocket-for-Python/pull/101) ([flaviogrossi](https://github.com/flaviogrossi)) +- ws4py.client classes should support client certificates [\#98](https://github.com/Lawouach/WebSocket-for-Python/pull/98) ([EliAndrewC](https://github.com/EliAndrewC)) +- Code correction in built-in client tutorial [\#96](https://github.com/Lawouach/WebSocket-for-Python/pull/96) ([elmiko](https://github.com/elmiko)) +- Fixed a couple of typos in the docs [\#92](https://github.com/Lawouach/WebSocket-for-Python/pull/92) ([rakiru](https://github.com/rakiru)) +- Fix typo in 'ws4y.websocket' [\#89](https://github.com/Lawouach/WebSocket-for-Python/pull/89) ([jodal](https://github.com/jodal)) +- Fix for bytestrings in Tornado client. [\#85](https://github.com/Lawouach/WebSocket-for-Python/pull/85) ([lbolla](https://github.com/lbolla)) + +## [v0.3.0-beta](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.3.0-beta) (2013-03-16) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.2.4...v0.3.0-beta) + +**Closed issues:** + +- Threaded WebSocket client always exits randomly [\#78](https://github.com/Lawouach/WebSocket-for-Python/issues/78) +- test\_cherrypy.py fails with py3 [\#72](https://github.com/Lawouach/WebSocket-for-Python/issues/72) +- A simpler gevent server example? [\#66](https://github.com/Lawouach/WebSocket-for-Python/issues/66) + +**Merged pull requests:** + +- select.select\(\) on Windows does not allow empty rlist. [\#83](https://github.com/Lawouach/WebSocket-for-Python/pull/83) ([Who8MyLunch](https://github.com/Who8MyLunch)) +- DOC: add omitted default value for closed\(\) in Client example [\#80](https://github.com/Lawouach/WebSocket-for-Python/pull/80) ([y-p](https://github.com/y-p)) +- README: Mention to wsaccel [\#79](https://github.com/Lawouach/WebSocket-for-Python/pull/79) ([methane](https://github.com/methane)) +- Faster utf8validate. [\#75](https://github.com/Lawouach/WebSocket-for-Python/pull/75) ([methane](https://github.com/methane)) +- Cleanup indent and trailing spaces. [\#74](https://github.com/Lawouach/WebSocket-for-Python/pull/74) ([methane](https://github.com/methane)) + +## [v0.2.4](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.2.4) (2012-12-13) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.2.3...v0.2.4) + +**Closed issues:** + +- echo\_cherrypy\_server with Python 3.2 fails on client connection [\#62](https://github.com/Lawouach/WebSocket-for-Python/issues/62) + +**Merged pull requests:** + +- Doc build improvements [\#65](https://github.com/Lawouach/WebSocket-for-Python/pull/65) ([jodal](https://github.com/jodal)) +- Don't broadcast messages to terminated WebSockets [\#64](https://github.com/Lawouach/WebSocket-for-Python/pull/64) ([jodal](https://github.com/jodal)) +- Fixup/readme [\#63](https://github.com/Lawouach/WebSocket-for-Python/pull/63) ([richo](https://github.com/richo)) + +## [v0.2.3](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.2.3) (2012-10-27) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.2.2...v0.2.3) + +**Closed issues:** + +- urlsplit in Python 2.6.1 and earlier doesn't parse ws or wss properly. [\#59](https://github.com/Lawouach/WebSocket-for-Python/issues/59) +- Inconsistent tabs/spaces [\#58](https://github.com/Lawouach/WebSocket-for-Python/issues/58) +- Bug in documentation [\#55](https://github.com/Lawouach/WebSocket-for-Python/issues/55) +- wss server support [\#40](https://github.com/Lawouach/WebSocket-for-Python/issues/40) +- Port to Python 3 [\#29](https://github.com/Lawouach/WebSocket-for-Python/issues/29) + +**Merged pull requests:** + +- Work around Python 2.6.X bug in urlparse.urlsplit\(\) [\#60](https://github.com/Lawouach/WebSocket-for-Python/pull/60) ([dsully](https://github.com/dsully)) +- Bug fix in WebSocketPlugin.broadcast\(\) [\#54](https://github.com/Lawouach/WebSocket-for-Python/pull/54) ([ralhei](https://github.com/ralhei)) +- Minor fix which turns an unintentional and confusing error message into the intended error message [\#53](https://github.com/Lawouach/WebSocket-for-Python/pull/53) ([EliAndrewC](https://github.com/EliAndrewC)) + +## [v0.2.2](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.2.2) (2012-06-21) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.2.1...v0.2.2) + +**Closed issues:** + +- memory leak in streaming.Stream [\#51](https://github.com/Lawouach/WebSocket-for-Python/issues/51) +- ws4py shouldn't send a masked message to the client [\#50](https://github.com/Lawouach/WebSocket-for-Python/issues/50) +- In client/\_\_init\_\_.py: remaining 'body' bytes ignored [\#46](https://github.com/Lawouach/WebSocket-for-Python/issues/46) +- ws4py.client.threadedclient is not compatible with ws4py.server.cherrypyserver [\#44](https://github.com/Lawouach/WebSocket-for-Python/issues/44) +- infinite loop in threadedclient.py when server closes websocket [\#23](https://github.com/Lawouach/WebSocket-for-Python/issues/23) + +**Merged pull requests:** + +- Change Sec-WebSocket-Origin header to Origin as per RFC [\#49](https://github.com/Lawouach/WebSocket-for-Python/pull/49) ([jtakkala](https://github.com/jtakkala)) +- Testing: Add support for `python setup.py test`, tox, and Travis CI [\#47](https://github.com/Lawouach/WebSocket-for-Python/pull/47) ([msabramo](https://github.com/msabramo)) +- Fixed geventclient.WebSocketClient.receive\(\) blocking forever [\#45](https://github.com/Lawouach/WebSocket-for-Python/pull/45) ([aluzzardi](https://github.com/aluzzardi)) +- Doctest fixed at ws4py.framing in Frame [\#43](https://github.com/Lawouach/WebSocket-for-Python/pull/43) ([stuntgoat](https://github.com/stuntgoat)) +- Delete greenlet start\(\) [\#42](https://github.com/Lawouach/WebSocket-for-Python/pull/42) ([yrttyr](https://github.com/yrttyr)) + +## [v0.2.1](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.2.1) (2012-03-28) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.2.0...v0.2.1) + +**Closed issues:** + +- wsgi.input \_sock not working [\#41](https://github.com/Lawouach/WebSocket-for-Python/issues/41) +- ImportError: No module named gevent [\#39](https://github.com/Lawouach/WebSocket-for-Python/issues/39) +- HandshakeError: WebSocket version required [\#36](https://github.com/Lawouach/WebSocket-for-Python/issues/36) +- tools.websocket.version should allow more than one version [\#34](https://github.com/Lawouach/WebSocket-for-Python/issues/34) +- TornadoWebSocketClient doesn't support SSL [\#32](https://github.com/Lawouach/WebSocket-for-Python/issues/32) +- Problem creating a websocket [\#31](https://github.com/Lawouach/WebSocket-for-Python/issues/31) +- KeyboardInterrupt ignored in WebSocketClient [\#30](https://github.com/Lawouach/WebSocket-for-Python/issues/30) + +**Merged pull requests:** + +- Delete start\(\) [\#38](https://github.com/Lawouach/WebSocket-for-Python/pull/38) ([yrttyr](https://github.com/yrttyr)) +- Tornado implementation fix [\#37](https://github.com/Lawouach/WebSocket-for-Python/pull/37) ([protoss-player](https://github.com/protoss-player)) +- Fix SSL support in TornadoWebSocketClient and add missing import [\#33](https://github.com/Lawouach/WebSocket-for-Python/pull/33) ([patrickod](https://github.com/patrickod)) +- Fix SSL Clients [\#27](https://github.com/Lawouach/WebSocket-for-Python/pull/27) ([chadselph](https://github.com/chadselph)) +- send\(\) really shouldn't fail silently when getting an unknown data type [\#26](https://github.com/Lawouach/WebSocket-for-Python/pull/26) ([chadselph](https://github.com/chadselph)) + +## [v0.2.0](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.2.0) (2012-02-23) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.1.5...v0.2.0) + +**Closed issues:** + +- Incorrect args in TornadoWebSocketClient constructor [\#25](https://github.com/Lawouach/WebSocket-for-Python/issues/25) +- Typo in echo\_client example [\#24](https://github.com/Lawouach/WebSocket-for-Python/issues/24) +- Typos following recent code changes... [\#22](https://github.com/Lawouach/WebSocket-for-Python/issues/22) +- ThreadedHandler still referenced [\#21](https://github.com/Lawouach/WebSocket-for-Python/issues/21) +- memory leak [\#20](https://github.com/Lawouach/WebSocket-for-Python/issues/20) +- Please store the close code and reason in WebSocketBaseClient [\#19](https://github.com/Lawouach/WebSocket-for-Python/issues/19) +- Exception when running with gevent 1.0 [\#18](https://github.com/Lawouach/WebSocket-for-Python/issues/18) +- Version 0.1.5 is not installable [\#17](https://github.com/Lawouach/WebSocket-for-Python/issues/17) +- TypeError: list indices must be integers, not str [\#16](https://github.com/Lawouach/WebSocket-for-Python/issues/16) +- All frames from the client should be masked [\#15](https://github.com/Lawouach/WebSocket-for-Python/issues/15) +- chrome 16.0.912.41 beta return code 400 [\#11](https://github.com/Lawouach/WebSocket-for-Python/issues/11) + +## [v0.1.5](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.1.5) (2011-12-15) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.1.4...v0.1.5) + +**Closed issues:** + +- Bad code for binary send in client/\_\_init\_\_.py ?? [\#14](https://github.com/Lawouach/WebSocket-for-Python/issues/14) +- Server not handling "Upgrade" header case-insensitively, as it should [\#13](https://github.com/Lawouach/WebSocket-for-Python/issues/13) + +**Merged pull requests:** + +- support for wss:// connections using ssl.wrap\_socket [\#12](https://github.com/Lawouach/WebSocket-for-Python/pull/12) ([EliAndrewC](https://github.com/EliAndrewC)) + +## [v0.1.4](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.1.4) (2011-11-12) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.1.3...v0.1.4) + +**Closed issues:** + +- Handle Connection: keep-alive, Upgrade header from Firefox 7.0 [\#3](https://github.com/Lawouach/WebSocket-for-Python/issues/3) + +**Merged pull requests:** + +- Hello, I had to make some minor changes to get the echo server to work for me. Thank for the excellent work. I am looking forward to incorporating it into my site :\). Regards, Derrick [\#10](https://github.com/Lawouach/WebSocket-for-Python/pull/10) ([dpetzold](https://github.com/dpetzold)) +- Added io\_loop parameter to TornadoWebSocketClient constructor [\#9](https://github.com/Lawouach/WebSocket-for-Python/pull/9) ([swax](https://github.com/swax)) +- Websocket threading client ignores initial data send by the server [\#7](https://github.com/Lawouach/WebSocket-for-Python/pull/7) ([majek](https://github.com/majek)) +- Fixed hangup in Tornado implementation [\#6](https://github.com/Lawouach/WebSocket-for-Python/pull/6) ([protoss-player](https://github.com/protoss-player)) +- Added a gevent client and fixed a major flaw in the gevent/"wsgi" server handler [\#5](https://github.com/Lawouach/WebSocket-for-Python/pull/5) ([progrium](https://github.com/progrium)) +- Some JSON functionality [\#4](https://github.com/Lawouach/WebSocket-for-Python/pull/4) ([protoss-player](https://github.com/protoss-player)) + +## [v0.1.3](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.1.3) (2011-09-07) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.1.2...v0.1.3) + +**Merged pull requests:** + +- Made it more generic, fixed some bugs, cleaned things up [\#2](https://github.com/Lawouach/WebSocket-for-Python/pull/2) ([progrium](https://github.com/progrium)) + +## [v0.1.2](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.1.2) (2011-08-23) +[Full Changelog](https://github.com/Lawouach/WebSocket-for-Python/compare/v0.1.1...v0.1.2) + +**Merged pull requests:** + +- gevent server implementation [\#1](https://github.com/Lawouach/WebSocket-for-Python/pull/1) ([progrium](https://github.com/progrium)) + +## [v0.1.1](https://github.com/Lawouach/WebSocket-for-Python/tree/v0.1.1) (2011-08-21) + + +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/JUNK/WebSocket-for-Python-master/LICENSE b/JUNK/WebSocket-for-Python-master/LICENSE new file mode 100644 index 0000000..aaccffd --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2011-2016, Sylvain Hellegouarch +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of ws4py nor the names of its contributors may be used + to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/JUNK/WebSocket-for-Python-master/MANIFEST.in b/JUNK/WebSocket-for-Python-master/MANIFEST.in new file mode 100644 index 0000000..373701c --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/MANIFEST.in @@ -0,0 +1,3 @@ +include LICENSE +include README.md +include CHANGELOG.md diff --git a/JUNK/WebSocket-for-Python-master/README.md b/JUNK/WebSocket-for-Python-master/README.md new file mode 100644 index 0000000..120dbdc --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/README.md @@ -0,0 +1,17 @@ +# WebSocket for Python (ws4py) + +[![Gitter](https://badges.gitter.im/Lawouach/WebSocket-for-Python.svg)](https://gitter.im/Lawouach/WebSocket-for-Python?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Build Status](https://travis-ci.org/Lawouach/WebSocket-for-Python.svg?branch=master)](https://travis-ci.org/Lawouach/WebSocket-for-Python) +[![PyPI](https://img.shields.io/pypi/v/ws4py.svg)](https://pypi.org/project/ws4py/) + +Python library providing an implementation of the WebSocket protocol defined in [RFC 6455](http://tools.ietf.org/html/rfc6455). + +Read the [documentation](https://ws4py.readthedocs.org/en/latest/) for more information. + +You can also join the [ws4py mailing-list](http://groups.google.com/group/ws4py) to discuss the library. + +## Installation + +``` +pip install ws4py +``` diff --git a/JUNK/WebSocket-for-Python-master/docs/Makefile b/JUNK/WebSocket-for-Python-master/docs/Makefile new file mode 100644 index 0000000..ff54f7b --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/Makefile @@ -0,0 +1,153 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ws4py.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ws4py.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/ws4py" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ws4py" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/JUNK/WebSocket-for-Python-master/docs/conf.py b/JUNK/WebSocket-for-Python-master/docs/conf.py new file mode 100644 index 0000000..391c609 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/conf.py @@ -0,0 +1,301 @@ +# -*- coding: utf-8 -*- +# +# ws4py documentation build configuration file, created by +# sphinx-quickstart on Sat Feb 18 19:54:37 2012. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath(os.path.join( + os.path.dirname(__file__), '..'))) + +from ws4py import __version__ + + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.coverage', + 'sphinx.ext.viewcode', + 'sphinx.ext.intersphinx', + 'sphinxcontrib.seqdiag'] +autoclass_content = 'init' +autodoc_member_order = 'bysource' +intersphinx_mapping = {'python': ('http://docs.python.org/2.7', None)} + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'ws4py' +copyright = u'2011 - 2016, Sylvain Hellegouarch' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = __version__ +# The full version, including alpha/beta/rc tags. +release = __version__ + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +add_function_parentheses = False + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +show_authors = True + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' +highlight_language = 'python' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +if os.environ.get('READTHEDOCS', None) == 'True': + html_theme = 'default' +else: + html_theme = 'sphinxdoc' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'ws4pydoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'ws4py.tex', u'ws4py Documentation', + u'Author', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'ws4py', u'ws4py Documentation', + [u'Author'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'ws4py', u'ws4py Documentation', + u'Author', 'ws4py', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + + +# -- Options for Epub output --------------------------------------------------- + +# Bibliographic Dublin Core info. +epub_title = u'ws4py' +epub_author = u'Sylvain Hellegouarch' +epub_publisher = u'Sylvain Hellegouarch' +epub_copyright = u'2011 - 2013, Sylvain Hellegouarch' + +# The language of the text. It defaults to the language option +# or en if the language is not set. +#epub_language = '' + +# The scheme of the identifier. Typical schemes are ISBN or URL. +#epub_scheme = '' + +# The unique identifier of the text. This can be a ISBN number +# or the project homepage. +#epub_identifier = '' + +# A unique identification for the text. +#epub_uid = '' + +# A tuple containing the cover image and cover page html template filenames. +#epub_cover = () + +# HTML files that should be inserted before the pages created by sphinx. +# The format is a list of tuples containing the path and title. +#epub_pre_files = [] + +# HTML files shat should be inserted after the pages created by sphinx. +# The format is a list of tuples containing the path and title. +#epub_post_files = [] + +# A list of files that should not be packed into the epub file. +#epub_exclude_files = [] + +# The depth of the table of contents in toc.ncx. +#epub_tocdepth = 3 + +# Allow duplicate toc entries. +#epub_tocdup = True diff --git a/JUNK/WebSocket-for-Python-master/docs/index.rst b/JUNK/WebSocket-for-Python-master/docs/index.rst new file mode 100644 index 0000000..dbdb460 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/index.rst @@ -0,0 +1,70 @@ +ws4py - A WebSocket package for Python +====================================== + +:Author: `Sylvain Hellegouarch `_ +:Release: |version| +:License: `BSD `_ +:Source code: https://github.com/Lawouach/WebSocket-for-Python +:Build status: https://travis-ci.org/Lawouach/WebSocket-for-Python + + +ws4py is a Python package implementing the WebSocket protocol as defined in `RFC 6455 `_. + +It comes with various server and client implementations and runs +on CPython 2/3, PyPy and Android. + +Overview +======== + +.. toctree:: + :maxdepth: 1 + + sources/requirements + sources/install + sources/conformance + sources/browser + sources/performance + sources/credits + + +Tutorial +======== + +.. toctree:: + :maxdepth: 2 + + sources/basics + sources/clienttutorial + sources/servertutorial + sources/managertutorial + sources/examples + +Maintainer Guide +================ + +This section describes the steps to work on ws4py itself and its release +process, as well as other conventions and best practices. + +.. toctree:: + :maxdepth: 1 + + sources/maintainer/rules + sources/maintainer/design + sources/maintainer/testing + sources/maintainer/documenting + sources/maintainer/releasing + +Packages +======== + +.. toctree:: + :maxdepth: 6 + + sources/ws4py + +Indices and tables +================== + +* :ref:`modindex` +* :ref:`search` + diff --git a/JUNK/WebSocket-for-Python-master/docs/make.bat b/JUNK/WebSocket-for-Python-master/docs/make.bat new file mode 100644 index 0000000..395afe9 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/make.bat @@ -0,0 +1,190 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +set I18NSPHINXOPTS=%SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% + set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. singlehtml to make a single large HTML file + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. devhelp to make HTML files and a Devhelp project + echo. epub to make an epub + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. text to make text files + echo. man to make manual pages + echo. texinfo to make Texinfo files + echo. gettext to make PO message catalogs + echo. changes to make an overview over all changed/added/deprecated items + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "singlehtml" ( + %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\ws4py.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\ws4py.ghc + goto end +) + +if "%1" == "devhelp" ( + %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. + goto end +) + +if "%1" == "epub" ( + %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The epub file is in %BUILDDIR%/epub. + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "text" ( + %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The text files are in %BUILDDIR%/text. + goto end +) + +if "%1" == "man" ( + %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The manual pages are in %BUILDDIR%/man. + goto end +) + +if "%1" == "texinfo" ( + %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. + goto end +) + +if "%1" == "gettext" ( + %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The message catalogs are in %BUILDDIR%/locale. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + if errorlevel 1 exit /b 1 + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + if errorlevel 1 exit /b 1 + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + if errorlevel 1 exit /b 1 + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +:end diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/basics.rst b/JUNK/WebSocket-for-Python-master/docs/sources/basics.rst new file mode 100644 index 0000000..5d8d271 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/basics.rst @@ -0,0 +1,40 @@ +Basics +====== + +ws4py provides a high-level, yet simple, interface to provide your application with WebSocket support. It is simple as: + +.. code-block:: python + + from ws4py.websocket import WebSocket + +The :class:`WebSocket ` class should be sub-classed by your application. To the very least we suggest you override the :func:`received_message(message) ` method so that you can process incoming messages. + +For instance a straightforward echo application would look like this: + +.. code-block:: python + + class EchoWebSocket(WebSocket): + def received_message(self, message): + self.send(message.data, message.is_binary) + +Other useful methods to implement are: + + * :func:`opened() ` which is called whenever the WebSocket handshake is done. + * :func:`closed(code, reason=None) ` which is called whenever the WebSocket connection is terminated. + +You may want to know if the connection is currently usable or :attr:`terminated `. + +At that stage, the subclass is still not connected to any data source. The way ws4py is designed, you don't +necessarily need a connected socket, in fact, you don't even need a socket at all. + + +.. code-block:: python + + >>> from ws4py.messaging import TextMessage + >>> def data_source(): + >>> yield TextMessage(u'hello world') + + >>> from mock import MagicMock + >>> source = MagicMock(side_effect=data_source) + >>> ws = EchoWebSocket(sock=source) + >>> ws.send(u'hello there') diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/browser.rst b/JUNK/WebSocket-for-Python-master/docs/sources/browser.rst new file mode 100644 index 0000000..9c72b75 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/browser.rst @@ -0,0 +1,16 @@ +.. _browser: + +Browser Support +=============== + +ws4py has been tested using: + +- Chromium 22 +- Firefox 16 + +See http://caniuse.com/websockets to determine the current +implementation's status of various browser vendors. + +Bear in mind that time is a premium and maintaining obsolete and unsecure +protocols is not one of ws4py's goals. It's therefore unlikely it will ever support older +versions of the protocol. diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/clienttutorial.rst b/JUNK/WebSocket-for-Python-master/docs/sources/clienttutorial.rst new file mode 100644 index 0000000..ab8b27f --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/clienttutorial.rst @@ -0,0 +1,124 @@ +Client +====== + +ws4py comes with various client implementations and they roughly share the same interface. + + +Built-in +-------- + +The built-in client relies only on modules provided by the Python stdlib. The +client's inner loop runs within a thread and therefore holds the thread alive +until the websocket is closed. + +.. code-block:: python + :linenos: + + from ws4py.client.threadedclient import WebSocketClient + + class DummyClient(WebSocketClient): + def opened(self): + def data_provider(): + for i in range(1, 200, 25): + yield "#" * i + + self.send(data_provider()) + + for i in range(0, 200, 25): + print i + self.send("*" * i) + + def closed(self, code, reason=None): + print "Closed down", code, reason + + def received_message(self, m): + print m + if len(m) == 175: + self.close(reason='Bye bye') + + if __name__ == '__main__': + try: + ws = DummyClient('ws://localhost:9000/', protocols=['http-only', 'chat']) + ws.connect() + ws.run_forever() + except KeyboardInterrupt: + ws.close() + +In this snippet, when the handshake is successful, the :meth:`opened() ` method is called and within this method we immediately send a bunch of messages to the server. First we demonstrate how you can use a generator to do so, then we simply send strings. + +Assuming the server echoes messages as they arrive, the :func:`received_message(message) ` method will print out the messages returned by the server and simply close the connection once it receives the last sent messages, which length is 175. + +Finally the :func:`closed(code, reason=None) ` method is called with the code and reason given by the server. + +.. seealso:: + :ref:`manager`. + +Tornado +------- + +If you are using a Tornado backend you may use the Tornado client that ws4py provides as follow: + + +.. code-block:: python + + from ws4py.client.tornadoclient import TornadoWebSocketClient + from tornado import ioloop + + class MyClient(TornadoWebSocketClient): + def opened(self): + for i in range(0, 200, 25): + self.send("*" * i) + + def received_message(self, m): + print m + if len(m) == 175: + self.close(reason='Bye bye') + + def closed(self, code, reason=None): + ioloop.IOLoop.instance().stop() + + ws = MyClient('ws://localhost:9000/echo', protocols=['http-only', 'chat']) + ws.connect() + + ioloop.IOLoop.instance().start() + +gevent +------ + +If you are using a gevent backend you may use the gevent client that ws4py provides as follow: + +.. code-block:: python + + from ws4py.client.geventclient import WebSocketClient + +This client can benefit from gevent's concepts as demonstrated below: + + +.. code-block:: python + + ws = WebSocketClient('ws://localhost:9000/echo', protocols=['http-only', 'chat']) + ws.connect() + + def incoming(): + """ + Greenlet waiting for incoming messages + until ``None`` is received, indicating we can + leave the loop. + """ + while True: + m = ws.receive() + if m is not None: + print str(m) + else: + break + + def send_a_bunch(): + for i in range(0, 40, 5): + ws.send("*" * i) + + greenlets = [ + gevent.spawn(incoming), + gevent.spawn(send_a_bunch), + ] + gevent.joinall(greenlets) + diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/conformance.rst b/JUNK/WebSocket-for-Python-master/docs/sources/conformance.rst new file mode 100644 index 0000000..e807f78 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/conformance.rst @@ -0,0 +1,13 @@ +.. _conformance: + +Conformance +=========== + + +ws4py tries hard to be as conformant as it can to the specification. +In order to validate this conformance, each release is run against the +`Autobahn testsuite `_ which provides an extensive +coverage of various aspects of the protocol. + +Online test reports can be found at: +http://www.defuze.org/oss/ws4py/testreports/servers/0.3.5. diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/credits.rst b/JUNK/WebSocket-for-Python-master/docs/sources/credits.rst new file mode 100644 index 0000000..a1b9195 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/credits.rst @@ -0,0 +1,10 @@ +.. _credits: + +Credits +======= + +Many thanks to the pywebsocket and Tornado projects which have provided a the starting point for ws4py. +Thanks also to Jeff Lindsay (progrium) for the initial gevent server support. +A well deserved thank you to Tobias Oberstein for `Autobahn `_ test suite. + +Obviously thanks to all the various folks who have provided bug reports and fixes. diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/examples.rst b/JUNK/WebSocket-for-Python-master/docs/sources/examples.rst new file mode 100644 index 0000000..273a2ee --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/examples.rst @@ -0,0 +1,24 @@ +.. _examples: + +Built-in Examples +================= + +Real-time chat +-------------- + +The ``echo_cherrypy_server`` example provides a simple Echo server. +It requires CherryPy 3.2.3. Open a couple of tabs pointing at http://localhost:9000 +and chat around. + +Android sensors and HTML5 +------------------------- + +The ``droid_sensor_cherrypy_server`` broadcasts sensor metrics to clients. +Point your browser to http://localhost:9000 +Then run the ``droid_sensor`` module from your Android device using +`SL4A `_. + +A screenshot of what this renders to can be found `here `_. + +You will find a lovely `video `_ of this demo in action +on YouTube thanks to Mat Bettinson for this. diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/install.rst b/JUNK/WebSocket-for-Python-master/docs/sources/install.rst new file mode 100644 index 0000000..3c89dd0 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/install.rst @@ -0,0 +1,30 @@ +Install ws4py +============= + +Get the code +------------ + +ws4py is hosted on `github `_ and can be retrieved from there: + +.. code-block:: console + + $ git clone git@github.com:Lawouach/WebSocket-for-Python.git + + +Installing the ws4py package is performed as usual: + +.. code-block:: console + + $ python setup.py install + +However, since ws4py is referenced in `PyPI `_, it can also be installed through easy_install, distribute or pip: + +.. code-block:: console + + $ pip install ws4py + $ easy_install ws4py + +.. note:: + + ws4py explicitly will not automatically pull out its dependencies. Please install them + manually depending on which implementation you'll be using. diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/design.rst b/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/design.rst new file mode 100644 index 0000000..3549f9d --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/design.rst @@ -0,0 +1,62 @@ +.. _design: + +Design +====== + +Workflow +-------- + +ws4py's design is actually fairly simple and straigtforward. At a high level this is what is going on: + +.. seqdiag:: + + seqdiag { + === HTTP Upgrade exchange === + client -> webserver [label = "GET /ws"]; + client <- webserver [label = "101 Switching Protocols"]; + === WebSocket exchange === + webserver --> ws4py_manager; + ws4py_manager --> ws4py_websocket [label = "opened"]; + ws4py_manager --> ws4py_manager [label = "poll"]; + client -> ws4py_manager [label = "send"]; + ws4py_manager --> ws4py_websocket [label = "received"]; + client <- ws4py_websocket [label = "send"]; + ws4py_manager --> ws4py_manager [label = "poll"]; + client <- ws4py_websocket [label = "send"]; + === WebSocket closing exchange (client initiated) === + client -> ws4py_manager [label = "close"]; + ws4py_manager --> ws4py_websocket [label = "close"]; + client <- ws4py_websocket [label = "close"]; + ws4py_manager --> ws4py_manager [label = "poll"]; + ws4py_manager --> ws4py_websocket [label = "closed"]; + } + +The initial connection is made by a WebSocket aware client to a WebSocket aware web server. The first exchange +is dedicated to perform the upgrade handshake as defined by :rfc:`6455#section-4`. + +If the exchange succeeds, the socket is kept opened, wrapped into a :class:`ws4py.websocket.WebSocket` instance +which is passed on to the global ws4py :class:`ws4py.manager.WebSocketManager` instance which will handle its lifecycle. + +Most notably, the manager will poll for the socket's receive events so that, when bytes are available, +the websocket object can read and process them. + +Implementation +-------------- + +ws4py data model is rather simple and follows the protocol itself: + +- a highlevel :class:`ws4py.websocket.WebSocket` class that determines actions to carry based on messages that are parsed. +- a :class:`ws4py.streaming.Stream` class that handles a single message at a time +- a :class:`ws4py.framing.Frame` class that performs the low level protocol parsing of frames + +Each are inter-connected as russian dolls generators. The process heavily relies on the capacity to send to a generator. So everytime one of those layers requires something, it yields and then its holder sends it back whatever was required. + +The Frame parser yields the number of bytes it needs at any time, the stream parser forwards it back to the WebSocket class which gets data from the underlying data provider it holds a reference to (a socket typically). The WebSocket class sends bytes as they are read from the socket down to the stream parser which forwards them to the frame parser. + +Eventually a frame is parsed and handled by the stream parser which in turns yields a complete message made of all parsed frames. + +The interesting aspect here is that the socket provider is totally abstracted from the protocol implementation which simply requires bytes as they come. + +This means one could write a ws4py socket provider that doesn't read from the wire but from any other source. + +It's also pretty fast and easy to read. diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/documenting.rst b/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/documenting.rst new file mode 100644 index 0000000..4896db3 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/documenting.rst @@ -0,0 +1,60 @@ +.. _documenting: + +Documentation process +===================== + +Basic principles +---------------- + +Document in that order: why, what, how +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Documenting ws4py is an important process since the code doesn't always carry enough +information to understand its design and context. Thus, documenting should target the +question "why?" first then the "what?" and "how?". It's actually trickier than it sound. + +Explicit is better than implicit +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +When you have your nose in the code it may sound straightforward enough not to document +certain aspects of pyalm. Remember that :pep:`20` principle: +**Explicit is better than implicit**. + +Be clear, not verbose +^^^^^^^^^^^^^^^^^^^^^ + +Finding the right balance between too much and not enough is hard. Writing +good documentation is just difficult. However, you should not be too verbose either. + +Add enough details to a section to provide context but don't flood the reader +with irrelevant information. + +Show me where you come from +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Every piece of code should be contextualized and almost every time you should +explicitely indicate the import statement so that the reader doesn't wonder +where an object comes from. + +Consistency for the greater good +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A user of ws4py should feel at ease with any part of the library and shouldn't +have to switch to a completely new mental model when going through +the library or documentation. Please refer again to :pep:`8`. + +Documentation Toolkit +--------------------- + +pyalm uses the Sphinx documentation generator toolkit so refer to its +`documentation `_ to learn more on its usage. + +Building the documentation is as simple as: + + .. code-block:: console + + cd docs + make html + +The generated documentation will be available in ``docs\_build\html``. + diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/releasing.rst b/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/releasing.rst new file mode 100644 index 0000000..a56b73c --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/releasing.rst @@ -0,0 +1,50 @@ +.. _releasing: + +Release Process +=============== + +ws4py's release process is as follow: + +1. Update the release minor or micro version. + + If necessary change also the major version. This should be saved only for major + modifications and/or API compatibility breakup. + + Edit ``ws4py/__init__.py`` accordingly. This will + propagate to the ``setup.py`` and ``docs/conf.py`` appropriately on its own. + + .. seealso:: `How to version? `_ You should read this. + +2. Run the unit test suites + + It's simple, fast and will make you sleep well at night. So `do it `_. + + If the test suite fails, do not release. It's a simple rule we constantly + fail for some reason. So if it fails, go back and fix it. + +3. Rebuild the documentation + + It may sound funny but a release with an out of date documentation has little + value. Keeping your documentation up to date is as important as having + no failing unit tests. + + Add to subversion any new documentation pages, both their sources and + the resulting HTML files. + +4. Build the source package + + First delete the ``build`` directory. + + Run the following command: + + .. code-block:: console + + python setup.py sdist --formats=gztar + + This will produce a tarball in the ``dist`` directory. + +5. Push the release to PyPI + +6. Tag the release in github + +7. Announce it to the world :) diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/rules.rst b/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/rules.rst new file mode 100644 index 0000000..38eae6c --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/rules.rst @@ -0,0 +1,14 @@ +.. _rules: + +Coding Rules +============ + +Python is a rather flexible language which favors conventions over configurations. +This is why, over the years, some community rules were published that most Python developers follow. +ws4py tries to follow those principles for the most part and therefore. + +Therefore please carefully read: + +- :pep:`8` that suggests a set of coding rules and naming conventions +- :pep:`20` for the spirit behind Python coding + diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/testing.rst b/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/testing.rst new file mode 100644 index 0000000..68d0811 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/maintainer/testing.rst @@ -0,0 +1,94 @@ +.. _testing: + +Testing Overview +================ + +ws4py is a Python library which means it can be tested in various fashion: + +- unit testing +- functional testing +- load testing + +Though all of them are of useful, ws4py mostly relies on functional testing. + +Unit Testing +------------ + +Unit testing solves complex issues in a simple fashion: + +- Micro-validation of classes and functions +- Ensure non-regression after modifications +- Critique the design as early as possible for minimum impact + +Too often, developers focus solely on the first two and fail +to realise how much feedback they can get by writing a simple unit tests. +Usually starting writing unit tests can take time because your +code is too tightly coupled with itself or external dependencies. This +should not the case, most of the time anyway. +So make sure to reflect on your code design whenever you have difficulties +setting up proper unit tests. + +.. note:: + + Unfortunately, for now ws4py has a rather shallow coverage as it relies + more on the functional testing to ensure the package is sane. I hope + to change this in the future. + +Framework +^^^^^^^^^ + +ws4py uses the Python built-in :mod:`unittest` module. Make sure you read +its extensive documentation. + +Execution +^^^^^^^^^ + +Test execution can be done as follow: + +.. code-block:: console + + cd test + + python -m unittest discover # execute all tests in the current directory + +Tests can obviously be executed via nose, unittest2 or py.test if you prefer. + +Functional Testing +------------------ + +ws4py relies heavily on the extensive `testing suite `_ +provided by the `Autobahn `_ project. + +The server test suite is used by many other WebSocket implementation out there +and provides a great way to validate interopability so it must be executed +before each release to the least. Please refer to the :ref:`requirements` +page to install the test suite. + +Execution +^^^^^^^^^ + +- Start the CherryPy server with PyPy 1.9 + + .. code-block:: console + + pypy test/autobahn_test_servers.py --run-cherrypy-server-pypy + +- Start the CherryPy server with Python 3.2 and/or 3.3 if you can. + + .. code-block:: console + + python3 test/autobahn_test_servers.py --run-cherrypy-server-py3k + +- Start all servers with Python 2.7 + + .. code-block:: console + + python2 test/autobahn_test_servers.py --run-all + +- Finally, execute the test suite as follow: + + .. code-block:: console + + wstest -m fuzzingclient -s test/fuzzingclient.json + +The whole test suite will take a while to complete so be patient. diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/managertutorial.rst b/JUNK/WebSocket-for-Python-master/docs/sources/managertutorial.rst new file mode 100644 index 0000000..8cc7b1a --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/managertutorial.rst @@ -0,0 +1,96 @@ +.. _manager: + +Managing a pool of WebSockets +============================= + +ws4py provides a :class:`ws4py.manager.WebSocketManager` class that takes care of +:class:`ws4py.websocket.WebSocket` instances once they the HTTP upgrade handshake +has been performed. + +The manager is not compulsory but makes it simpler to track and let them run +in your application's process. + +When you :meth:`add(websocket) ` a +websocket to the manager, the file-descriptor is registered with the +manager's poller and the :meth:`opened() ` +method on is called. + +Polling +------- + +The manager uses a polling mechanism to dispatch on socket incoming events. +Two pollers are implemented, one using the traditionnal :py:mod:`select` +and another one based on `select.epoll `_ +which is used only if available on the system. + +The polling is executed in its own thread, it keeps looping until +the manager :meth:`stop() ` method. + +On every loop, the poller is called to poll for all registered file-descriptors. +If any one of them is ready, we retrieve the websocket using that descriptor +and, if the websocket is not yet terminated, we call its `once` method +so that the incoming bytes are processed. + +If the processing fails in anyway, the manager terminates the websocket and +remove it from itself. + +Client example +-------------- + +Below is a simple example on how to start 2000 clients against +a single server. + +.. code-block:: python + :linenos: + + from ws4py.client import WebSocketBaseClient + from ws4py.manager import WebSocketManager + from ws4py import format_addresses, configure_logger + + logger = configure_logger() + + m = WebSocketManager() + + class EchoClient(WebSocketBaseClient): + def handshake_ok(self): + logger.info("Opening %s" % format_addresses(self)) + m.add(self) + + def received_message(self, msg): + logger.info(str(msg)) + + if __name__ == '__main__': + import time + + try: + m.start() + for i in range(2000): + client = EchoClient('ws://localhost:9000/ws') + client.connect() + + logger.info("%d clients are connected" % i) + + while True: + for ws in m.websockets.itervalues(): + if not ws.terminated: + break + else: + break + time.sleep(3) + except KeyboardInterrupt: + m.close_all() + m.stop() + m.join() + +Once those are created against the ``echo_cherrypy_server`` example for instance, +point your browser to http://localhost:9000/ and enter a message. It will be +broadcasted to all connected peers. + +When a peer is closed, its connection is automatically removed from the manager +so you should never need to explicitely remove it. + +.. note:: + + The CherryPy and wsgiref servers internally use a manager to handle connected + websockets. The gevent server relies only on a greenlet + `group `_ instead. diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/performance.rst b/JUNK/WebSocket-for-Python-master/docs/sources/performance.rst new file mode 100644 index 0000000..9994145 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/performance.rst @@ -0,0 +1,17 @@ +.. _perf: + +Performances +============ + +ws4py doesn't perform too bad but it's far from being the fastest WebSocket lib under heavy load. +The reason is that it was first designed to implement the protocol with simplicity and clarity in mind. +Future developments will look at performances. + +.. note:: + + ws4py runs faster in some cases on PyPy than it does on CPython. + +.. note:: + + The `wsaccel `_ package + replaces some internal bottleneck with a Cython implementation. diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/requirements.rst b/JUNK/WebSocket-for-Python-master/docs/sources/requirements.rst new file mode 100644 index 0000000..6d620e3 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/requirements.rst @@ -0,0 +1,47 @@ +.. _requirements: + +Requirements +============ + +Python +------ + +Tested environments: + +- Python 2.7+ +- Python 3.3+ +- PyPy 1.8+ +- Android 2.3 via `SL4A `_ + +.. note:: + + ws4py will not try to automatically install dependencies and will + let you decide which one you need. + +Client +------ + +ws4py comes with three client implementations: + +- Built-in: That client is solely based on the Python stdlib, it uses a thread to run the inner processing loop. +- Tornado: The Tornado client requires `Tornado `_ 2.0+ +- gevent: The gevent client requires `gevent `_ 0.13.6 or 1.0.0-dev + +Server +------ + +ws4py comes with three server implementations: + +- Built-in: The server relies on the built-in :mod:`wsgiref` module. +- CherryPy: The `CherryPy `_ server requires 3.2.2+ +- gevent: The gevent server requires `gevent `_ 1.0.0 +- asyncio: :pep:`3156` implementation for Python 3.3+ + +Testing +------- + +ws4py uses the Autobahn functional test suite to ensure it respects the standard. You +must install it to run that test suite against ws4py. + +- Autobahn `python `_ +- Autobahn `test suite `_ diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/servertutorial.rst b/JUNK/WebSocket-for-Python-master/docs/sources/servertutorial.rst new file mode 100644 index 0000000..802548c --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/servertutorial.rst @@ -0,0 +1,108 @@ +Server +====== + +ws4py comes with a few server implementations built around the main :class:`WebSocket ` class. + +CherryPy +-------- + +ws4py provides an extension to CherryPy 3 to enable WebSocket from the framework layer. It is based on the CherryPy `plugin `_ and `tool `_ mechanisms. + +The :class:`WebSocket tool ` plays at the request level on every request received by the server. Its goal is to perform the WebSocket handshake and, if it succeeds, to create the :class:`WebSocket ` instance (well a subclass you will be implementing) and push it to the plugin. + +The :class:`WebSocket plugin ` works at the CherryPy system level and has a single instance throughout. Its goal is to track websocket instances created by the tool and free their resources when connections are closed. + +Here is a simple example of an echo server: + +.. code-block:: python + :linenos: + + import cherrypy + from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool + from ws4py.websocket import EchoWebSocket + + cherrypy.config.update({'server.socket_port': 9000}) + WebSocketPlugin(cherrypy.engine).subscribe() + cherrypy.tools.websocket = WebSocketTool() + + class Root(object): + @cherrypy.expose + def index(self): + return 'some HTML with a websocket javascript connection' + + @cherrypy.expose + def ws(self): + # you can access the class instance through + handler = cherrypy.request.ws_handler + + cherrypy.quickstart(Root(), '/', config={'/ws': {'tools.websocket.on': True, + 'tools.websocket.handler_cls': EchoWebSocket}}) + + +Note how we specify the class which should be instanciated by the server on each connection. The great aspect of the tool mechanism is that you can specify a different class on a per-path basis. + + +gevent +------ + +`gevent `_ is a coroutine, called greenlets, implementation for very concurrent applications. ws4py offers a server implementation for this library on top of the `WSGI protocol `_. Using it is as simple as: + +.. code-block:: python + :linenos: + + from gevent import monkey; monkey.patch_all() + from ws4py.websocket import EchoWebSocket + from ws4py.server.geventserver import WSGIServer + from ws4py.server.wsgiutils import WebSocketWSGIApplication + + server = WSGIServer(('localhost', 9000), WebSocketWSGIApplication(handler_cls=EchoWebSocket)) + server.serve_forever() + +First we patch all the standard modules so that the stdlib runs well with as gevent. Then we simply create a `WSGI `_ server and specify the class which will be instanciated internally each time a connection is successful. + +wsgiref +------- + +:py:mod:`wsgiref` is a built-in WSGI package that provides various classes and helpers to develop against WSGI. Mostly it provides a basic WSGI server that can be usedfor testing or simple demos. ws4py provides support for websocket on wsgiref for testing purpose as well. It's not meant to be used in production, since it can only initiate web socket connections one at a time, as a result of being single threaded. However, once accepted, ws4py takes over, which is multithreaded by default. + +.. code-block:: python + :linenos: + + from wsgiref.simple_server import make_server + from ws4py.websocket import EchoWebSocket + from ws4py.server.wsgirefserver import WSGIServer, WebSocketWSGIRequestHandler + from ws4py.server.wsgiutils import WebSocketWSGIApplication + + server = make_server('', 9000, server_class=WSGIServer, + handler_class=WebSocketWSGIRequestHandler, + app=WebSocketWSGIApplication(handler_cls=EchoWebSocket)) + server.initialize_websockets_manager() + server.serve_forever() + +asyncio +------- + +:py:mod:`asyncio` is the implementation of :pep:`3156`, the new asynchronous framework for concurrent +applications. + +.. code-block:: python + :linenos: + + from ws4py.async_websocket import EchoWebSocket + + loop = asyncio.get_event_loop() + + def start_server(): + proto_factory = lambda: WebSocketProtocol(EchoWebSocket) + return loop.create_server(proto_factory, '', 9007) + + s = loop.run_until_complete(start_server()) + print('serving on', s.sockets[0].getsockname()) + loop.run_forever() + +.. warning:: + + The provided HTTP server used for the handshake is clearly not production ready. However, + once the handshake is performed, the rest of the code runs the same stack as the other + server implementations. It should be easy to replace the HTTP interface with any + asyncio aware HTTP framework. diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/ws4py.client.rst b/JUNK/WebSocket-for-Python-master/docs/sources/ws4py.client.rst new file mode 100644 index 0000000..2231d2f --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/ws4py.client.rst @@ -0,0 +1,35 @@ +client Package +============== + +:mod:`client` Package +--------------------- + +.. automodule:: ws4py.client + :members: + :undoc-members: + :show-inheritance: + +:mod:`geventclient` Module +-------------------------- + +.. automodule:: ws4py.client.geventclient + :members: + :undoc-members: + :show-inheritance: + +:mod:`threadedclient` Module +---------------------------- + +.. automodule:: ws4py.client.threadedclient + :members: + :undoc-members: + :show-inheritance: + +:mod:`tornadoclient` Module +--------------------------- + +.. automodule:: ws4py.client.tornadoclient + :members: + :undoc-members: + :show-inheritance: + diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/ws4py.rst b/JUNK/WebSocket-for-Python-master/docs/sources/ws4py.rst new file mode 100644 index 0000000..4678685 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/ws4py.rst @@ -0,0 +1,75 @@ +ws4py Package +============= + +:mod:`ws4py` Package +-------------------- + +.. automodule:: ws4py.__init__ + :members: + :undoc-members: + :show-inheritance: + +:mod:`exc` Module +----------------- + +.. automodule:: ws4py.exc + :members: + :undoc-members: + :show-inheritance: + +:mod:`framing` Module +--------------------- + +.. automodule:: ws4py.framing + :members: + :undoc-members: + :show-inheritance: + +:mod:`manager` Module +--------------------- + +.. automodule:: ws4py.manager + :members: + :undoc-members: + :show-inheritance: + +:mod:`messaging` Module +----------------------- + +.. automodule:: ws4py.messaging + :members: + :undoc-members: + :show-inheritance: + +:mod:`streaming` Module +----------------------- + +.. automodule:: ws4py.streaming + :members: + :undoc-members: + :show-inheritance: + +:mod:`utf8validator` Module +--------------------------- + +.. automodule:: ws4py.utf8validator + :members: + :undoc-members: + :show-inheritance: + +:mod:`websocket` Module +----------------------- + +.. automodule:: ws4py.websocket + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + + ws4py.client + ws4py.server + diff --git a/JUNK/WebSocket-for-Python-master/docs/sources/ws4py.server.rst b/JUNK/WebSocket-for-Python-master/docs/sources/ws4py.server.rst new file mode 100644 index 0000000..2dcc0f7 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/docs/sources/ws4py.server.rst @@ -0,0 +1,35 @@ +server Package +============== + +:mod:`cherrypyserver` Module +---------------------------- + +.. automodule:: ws4py.server.cherrypyserver + :members: + :undoc-members: + :show-inheritance: + +:mod:`geventserver` Module +-------------------------- + +.. automodule:: ws4py.server.geventserver + :members: + :undoc-members: + :show-inheritance: + +:mod:`wsgirefserver` Module +--------------------------- + +.. automodule:: ws4py.server.wsgirefserver + :members: + :undoc-members: + :show-inheritance: + +:mod:`wsgitutils` Module +------------------------ + +.. automodule:: ws4py.server.wsgiutils + :members: + :undoc-members: + :show-inheritance: + diff --git a/JUNK/WebSocket-for-Python-master/example/basic/app.py b/JUNK/WebSocket-for-Python-master/example/basic/app.py new file mode 100644 index 0000000..7d0745c --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/basic/app.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +__doc__ = """ +A simple chat example using a CherryPy webserver. + +$ pip install cherrypy + +Then run it as follow: + +$ python app.py + +You will want to edit this file to change the +ws_addr variable used by the websocket object to connect +to your endpoint. Probably using the actual IP +address of your machine. +""" +import random +import os + +import cherrypy + +from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool +from ws4py.websocket import WebSocket +from ws4py.messaging import TextMessage + +cur_dir = os.path.normpath(os.path.abspath(os.path.dirname(__file__))) +index_path = os.path.join(cur_dir, 'index.html') +index_page = file(index_path, 'r').read() + +class ChatWebSocketHandler(WebSocket): + def received_message(self, m): + cherrypy.engine.publish('websocket-broadcast', m) + + def closed(self, code, reason="A client left the room without a proper explanation."): + cherrypy.engine.publish('websocket-broadcast', TextMessage(reason)) + +class ChatWebApp(object): + @cherrypy.expose + def index(self): + return index_page % {'username': "User%d" % random.randint(50, 1000), + 'ws_addr': 'ws://localhost:9000/ws'} + + @cherrypy.expose + def ws(self): + cherrypy.log("Handler created: %s" % repr(cherrypy.request.ws_handler)) + +if __name__ == '__main__': + cherrypy.config.update({ + 'server.socket_host': '0.0.0.0', + 'server.socket_port': 9000 + }) + + WebSocketPlugin(cherrypy.engine).subscribe() + cherrypy.tools.websocket = WebSocketTool() + + cherrypy.quickstart(ChatWebApp(), '', + config={ + '/': { + 'tools.response_headers.on': True, + 'tools.response_headers.headers': [ + ('X-Frame-options', 'deny'), + ('X-XSS-Protection', '1; mode=block'), + ('X-Content-Type-Options', 'nosniff') + ] + }, + '/ws': { + 'tools.websocket.on': True, + 'tools.websocket.handler_cls': ChatWebSocketHandler + }, + }) diff --git a/JUNK/WebSocket-for-Python-master/example/basic/index.html b/JUNK/WebSocket-for-Python-master/example/basic/index.html new file mode 100644 index 0000000..b88c531 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/basic/index.html @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + +
+
+ +
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+ + \ No newline at end of file diff --git a/JUNK/WebSocket-for-Python-master/example/bug167_client.py b/JUNK/WebSocket-for-Python-master/example/bug167_client.py new file mode 100644 index 0000000..a596770 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/bug167_client.py @@ -0,0 +1,65 @@ +def run_threaded(): + from ws4py.client.threadedclient import WebSocketClient + class EchoClient(WebSocketClient): + def opened(self): + self.send("hello") + + def closed(self, code, reason=None): + print(("Closed down", code, reason)) + + def received_message(self, m): + print(m) + self.close() + + try: + ws = EchoClient('wss://localhost:9000/ws') + ws.connect() + ws.run_forever() + except KeyboardInterrupt: + ws.close() + +def run_tornado(): + from tornado import ioloop + from ws4py.client.tornadoclient import TornadoWebSocketClient + class MyClient(TornadoWebSocketClient): + def opened(self): + self.send("hello") + + def closed(self, code, reason=None): + print(("Closed down", code, reason)) + ioloop.IOLoop.instance().stop() + + def received_message(self, m): + print(m) + self.close() + + ws = MyClient('wss://localhost:9000/ws') + ws.connect() + + ioloop.IOLoop.instance().start() + +def run_gevent(): + from gevent import monkey; monkey.patch_all() + import gevent + from ws4py.client.geventclient import WebSocketClient + + ws = WebSocketClient('wss://localhost:9000/ws') + ws.connect() + + ws.send("hello") + + def incoming(): + while True: + m = ws.receive() + if m is not None: + print(m) + else: + break + + ws.close() + + gevent.joinall([gevent.spawn(incoming)]) + +#run_gevent() +run_threaded() +run_tornado() diff --git a/JUNK/WebSocket-for-Python-master/example/droid_sensor.py b/JUNK/WebSocket-for-Python-master/example/droid_sensor.py new file mode 100644 index 0000000..7f9e8af --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/droid_sensor.py @@ -0,0 +1,102 @@ +# -*- coding: utf-8 -*- +__doc__ = """ +WebSocket client that pushes Android sensor metrics to the +websocket server it is connected to. + +In order to set this up: + + 1. Install SL4A http://code.google.com/p/android-scripting/ + 2. Install the Python package for SL4A + 3. Build ws4py and copy the package built into a directory + called com.googlecode.pythonforandroid/extras/python on + your Android device. + 4. a. Either copy the droid_sensor.py module into the directory + called sl4a/scripts on your Android device. + b. Or set up the remote control so that you can run the + module from your computer directly on your device: + http://code.google.com/p/android-scripting/wiki/RemoteControl + 5. Setup the device so that it has an IP address on the same + network as the computer running the server. + +Run the example: + + 1. Start the echo_cherrypy_server module: + $ python example/droid_sensor_cherrypy_server.py + 2. From a local browser, go to: + http://localhost:9000/ + 3. Edit the droid_sensor module to set the appropriate + IP address where your server is running. + 4. Run the droid_sensor module (from the device or + your computer depending on your setup): + $ python example/droid_sensor.py + 5. If your device isn't idled, just move ir around + for the metrics to be sent to the server which + will dispatch them to the browser's client. + 6. Profit??? + +""" +import time +import math + +import android +from ws4py.client.threadedclient import WebSocketClient + +class AirPongSensor(object): + def __init__(self, host): + self.droid = android.Android() + #self.droid.startSensingThreshold(1, 0, 7) + #self.droid.startSensingThreshold(2, 1, 2) + self.droid.startSensingTimed(1, 100) + + self.running = False + + self.client = AirPongWebSocketClient(host) + self.client.connect() + + def run(self): + try: + self.running = True + last = [None, None, None] + while self.running: + azimuth, pitch, roll = self.droid.sensorsReadOrientation().result + accel = x, y, z = self.droid.sensorsReadAccelerometer().result + if azimuth is None: + continue + + c = lambda rad: rad * 360.0 / math.pi + print c(azimuth), c(pitch), c(roll), x, y, z + + if self.client.terminated: + break + + if accel != [None, None, None] and accel != last: + last = accel + self.client.send("%s %s %s %s %s %s" % (c(azimuth), c(pitch), c(roll), x, y, z)) + + time.sleep(0.15) + finally: + self.terminate() + + def terminate(self): + if not self.droid: + return + + self.running = False + self.droid.stopSensing() + self.droid = None + + if not self.client.terminated: + self.client.close() + self.client._th.join() + self.client = None + +class AirPongWebSocketClient(WebSocketClient): + def received_message(self, m): + pass + +if __name__ == '__main__': + aps = AirPongSensor(host='http://192.168.0.10:9000/ws') + try: + aps.run() + except KeyboardInterrupt: + aps.terminate() diff --git a/JUNK/WebSocket-for-Python-master/example/droid_sensor_cherrypy_server.py b/JUNK/WebSocket-for-Python-master/example/droid_sensor_cherrypy_server.py new file mode 100644 index 0000000..b342540 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/droid_sensor_cherrypy_server.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +import os.path +import cherrypy + +from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool +from ws4py.websocket import WebSocket + +class BroadcastWebSocketHandler(WebSocket): + def received_message(self, m): + cherrypy.engine.publish('websocket-broadcast', str(m)) + +class Root(object): + @cherrypy.expose + def display(self): + return """ + + + + WebSocket example displaying Android device sensors + + + + + + + + +
+ +
+ + + """ + + @cherrypy.expose + def ws(self): + cherrypy.log("Handler created: %s" % repr(cherrypy.request.ws_handler)) + + @cherrypy.expose + def index(self): + return """ + + + + WebSocket example displaying Android device sensors + + + + + + + + + """ + +if __name__ == '__main__': + cherrypy.config.update({ + 'server.socket_host': '0.0.0.0', + 'server.socket_port': 9000, + 'tools.staticdir.root': os.path.abspath(os.path.join(os.path.dirname(__file__), 'static')) + } + ) + print os.path.abspath(os.path.join(__file__, 'static')) + WebSocketPlugin(cherrypy.engine).subscribe() + cherrypy.tools.websocket = WebSocketTool() + + cherrypy.quickstart(Root(), '', config={ + '/js': { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': 'js' + }, + '/css': { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': 'css' + }, + '/images': { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': 'images' + }, + '/ws': { + 'tools.websocket.on': True, + 'tools.websocket.handler_cls': BroadcastWebSocketHandler + } + } + ) diff --git a/JUNK/WebSocket-for-Python-master/example/echo_chaussette_server.py b/JUNK/WebSocket-for-Python-master/example/echo_chaussette_server.py new file mode 100644 index 0000000..688d6dc --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/echo_chaussette_server.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +import logging + +from gevent import monkey; monkey.patch_all() +import gevent +from ws4py.server.geventserver import WebSocketWSGIApplication, \ + WebSocketWSGIHandler, GEventWebSocketPool +from ws4py.websocket import EchoWebSocket + +from chaussette.backend._gevent import Server as GeventServer + +class ws4pyServer(GeventServer): + handler_class = WebSocketWSGIHandler + + def __init__(self, *args, **kwargs): + GeventServer.__init__(self, *args, **kwargs) + self.pool = GEventWebSocketPool() + + def stop(self, *args, **kwargs): + self.pool.clear() + self.pool = None + GeventServer.stop(self, *args, **kwargs) + +if __name__ == '__main__': + import os, socket, sys + from ws4py import configure_logger + logger = configure_logger() + + from chaussette.backend import register + register('ws4py', ws4pyServer) + + from chaussette.server import make_server + server = make_server(app=WebSocketWSGIApplication(handler_cls=EchoWebSocket), + host='unix:///%s/ws.sock' % os.getcwd(), + address_family=socket.AF_UNIX, + backend='ws4py', + logger=logger) + try: + server.serve_forever() + except KeyboardInterrupt: + sys.exit(0) diff --git a/JUNK/WebSocket-for-Python-master/example/echo_cherrypy_server.py b/JUNK/WebSocket-for-Python-master/example/echo_cherrypy_server.py new file mode 100644 index 0000000..6ce0b0e --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/echo_cherrypy_server.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +import argparse +import random +import os + +import cherrypy + +from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool +from ws4py.websocket import WebSocket +from ws4py.messaging import TextMessage + +class ChatWebSocketHandler(WebSocket): + def received_message(self, m): + cherrypy.engine.publish('websocket-broadcast', m) + + def closed(self, code, reason="A client left the room without a proper explanation."): + cherrypy.engine.publish('websocket-broadcast', TextMessage(reason)) + +class Root(object): + def __init__(self, host, port, ssl=False): + self.host = host + self.port = port + self.scheme = 'wss' if ssl else 'ws' + + @cherrypy.expose + def index(self): + return """ + + + + + +
+ +
+ + +
+ + + """ % {'username': "User%d" % random.randint(0, 100), 'host': self.host, 'port': self.port, 'scheme': self.scheme} + + @cherrypy.expose + def ws(self): + cherrypy.log("Handler created: %s" % repr(cherrypy.request.ws_handler)) + +if __name__ == '__main__': + import logging + from ws4py import configure_logger + configure_logger(level=logging.DEBUG) + + parser = argparse.ArgumentParser(description='Echo CherryPy Server') + parser.add_argument('--host', default='127.0.0.1') + parser.add_argument('-p', '--port', default=9000, type=int) + parser.add_argument('--ssl', action='store_true') + args = parser.parse_args() + + cherrypy.config.update({'server.socket_host': args.host, + 'server.socket_port': args.port, + 'tools.staticdir.root': os.path.abspath(os.path.join(os.path.dirname(__file__), 'static'))}) + + if args.ssl: + cherrypy.config.update({'server.ssl_certificate': './server.crt', + 'server.ssl_private_key': './server.key'}) + + WebSocketPlugin(cherrypy.engine).subscribe() + cherrypy.tools.websocket = WebSocketTool() + + cherrypy.quickstart(Root(args.host, args.port, args.ssl), '', config={ + '/ws': { + 'tools.websocket.on': True, + 'tools.websocket.handler_cls': ChatWebSocketHandler + }, + '/js': { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': 'js' + } + } + ) diff --git a/JUNK/WebSocket-for-Python-master/example/echo_cherrypy_server_nojquery.py b/JUNK/WebSocket-for-Python-master/example/echo_cherrypy_server_nojquery.py new file mode 100644 index 0000000..33277b3 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/echo_cherrypy_server_nojquery.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +import argparse +import random +import os + +import cherrypy + +from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool +from ws4py.websocket import WebSocket +from ws4py.messaging import TextMessage + +class ChatWebSocketHandler(WebSocket): + def received_message(self, m): + cherrypy.engine.publish('websocket-broadcast', m) + + def closed(self, code, reason="A client left the room without a proper explanation."): + cherrypy.engine.publish('websocket-broadcast', TextMessage(reason)) + +class Root(object): + def __init__(self, host, port, ssl=False): + self.host = host + self.port = port + self.scheme = 'wss' if ssl else 'ws' + + @cherrypy.expose + def index(self): + return """ + + + +

Note: If viewing this as localhost via SSL and it doesn't work, try using 127.0.0.1 directly

+
+ +
+ + +
+ + + + """ % {'username': "User%d" % random.randint(0, 100), 'host': self.host, 'port': self.port, 'scheme': self.scheme} + + @cherrypy.expose + def ws(self): + cherrypy.log("Handler created: %s" % repr(cherrypy.request.ws_handler)) + +if __name__ == '__main__': + import logging + from ws4py import configure_logger + configure_logger(level=logging.DEBUG) + + parser = argparse.ArgumentParser(description='Echo CherryPy Server') + parser.add_argument('--host', default='127.0.0.1') + parser.add_argument('-p', '--port', default=9000, type=int) + parser.add_argument('--ssl', action='store_true') + args = parser.parse_args() + + cherrypy.config.update({'server.socket_host': args.host, + 'server.socket_port': args.port, + 'tools.staticdir.root': os.path.abspath(os.path.join(os.path.dirname(__file__), 'static'))}) + + if args.ssl: + cherrypy.config.update({ + 'server.ssl_module':'builtin', +'server.ssl_certificate': 'server.crt', + 'server.ssl_private_key': 'server.key'}) + + WebSocketPlugin(cherrypy.engine).subscribe() + cherrypy.tools.websocket = WebSocketTool() + + cherrypy.quickstart(Root(args.host, args.port, args.ssl), '', config={ + '/ws': { + 'tools.websocket.on': True, + 'tools.websocket.handler_cls': ChatWebSocketHandler + }, + '/js': { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': 'js' + } + } + ) diff --git a/JUNK/WebSocket-for-Python-master/example/echo_client.py b/JUNK/WebSocket-for-Python-master/example/echo_client.py new file mode 100644 index 0000000..9191792 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/echo_client.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +from ws4py.client.threadedclient import WebSocketClient + +class EchoClient(WebSocketClient): + def opened(self): + def data_provider(): + for i in range(1, 200, 25): + yield "#" * i + + self.send(data_provider()) + + for i in range(0, 200, 25): + print(i) + self.send("*" * i) + + def closed(self, code, reason): + print(("Closed down", code, reason)) + + def received_message(self, m): + print("=> %d %s" % (len(m), str(m))) + if len(m) == 175: + self.close(reason='Bye bye') + +if __name__ == '__main__': + try: + ws = EchoClient('ws://localhost:9000/ws', protocols=['http-only', 'chat']) + ws.daemon = False + ws.connect() + except KeyboardInterrupt: + ws.close() diff --git a/JUNK/WebSocket-for-Python-master/example/echo_gevent_client.py b/JUNK/WebSocket-for-Python-master/example/echo_gevent_client.py new file mode 100644 index 0000000..651bcca --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/echo_gevent_client.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +from gevent import monkey; monkey.patch_all() + +import gevent +from ws4py.client.geventclient import WebSocketClient + +if __name__ == '__main__': + ws = WebSocketClient('ws://127.0.0.1:9000/ws', protocols=['http-only', 'chat']) + ws.connect() + + ws.send("Hello world") + print((ws.receive(),)) + + ws.send("Hello world again") + print((ws.receive(),)) + + def incoming(): + while True: + m = ws.receive() + if m is not None: + m = str(m) + print((m, len(m))) + if len(m) == 35: + ws.close() + break + else: + break + print(("Connection closed!",)) + + def outgoing(): + for i in range(0, 40, 5): + ws.send("*" * i) + + # We won't get this back + ws.send("Foobar") + + greenlets = [ + gevent.spawn(incoming), + gevent.spawn(outgoing), + ] + gevent.joinall(greenlets) diff --git a/JUNK/WebSocket-for-Python-master/example/echo_gevent_server.py b/JUNK/WebSocket-for-Python-master/example/echo_gevent_server.py new file mode 100644 index 0000000..100a536 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/echo_gevent_server.py @@ -0,0 +1,149 @@ +# -*- coding: utf-8 -*- +from gevent import monkey; monkey.patch_all() + +import argparse +import random +import os + +import gevent +import gevent.pywsgi + +from ws4py.server.geventserver import WebSocketWSGIApplication, \ + WebSocketWSGIHandler, WSGIServer +from ws4py.websocket import EchoWebSocket + +class BroadcastWebSocket(EchoWebSocket): + def opened(self): + app = self.environ['ws4py.app'] + app.clients.append(self) + + def received_message(self, m): + # self.clients is set from within the server + # and holds the list of all connected servers + # we can dispatch to + app = self.environ['ws4py.app'] + for client in app.clients: + client.send(m) + + def closed(self, code, reason="A client left the room without a proper explanation."): + app = self.environ.pop('ws4py.app') + if self in app.clients: + app.clients.remove(self) + for client in app.clients: + try: + client.send(reason) + except: + pass + +class EchoWebSocketApplication(object): + def __init__(self, host, port): + self.host = host + self.port = port + self.ws = WebSocketWSGIApplication(handler_cls=BroadcastWebSocket) + + # keep track of connected websocket clients + # so that we can brodcasts messages sent by one + # to all of them. Aren't we cool? + self.clients = [] + + def __call__(self, environ, start_response): + """ + Good ol' WSGI application. This is a simple demo + so I tried to stay away from dependencies. + """ + if environ['PATH_INFO'] == '/favicon.ico': + return self.favicon(environ, start_response) + + if environ['PATH_INFO'] == '/ws': + environ['ws4py.app'] = self + return self.ws(environ, start_response) + + return self.webapp(environ, start_response) + + def favicon(self, environ, start_response): + """ + Don't care about favicon, let's send nothing. + """ + status = '200 OK' + headers = [('Content-type', 'text/plain')] + start_response(status, headers) + return "" + + def webapp(self, environ, start_response): + """ + Our main webapp that'll display the chat form + """ + status = '200 OK' + headers = [('Content-type', 'text/html')] + + start_response(status, headers) + + return """ + + + + + +
+ +
+ + +
+ + + """ % {'username': "User%d" % random.randint(0, 100), + 'host': self.host, + 'port': self.port} + +if __name__ == '__main__': + from ws4py import configure_logger + configure_logger() + + parser = argparse.ArgumentParser(description='Echo gevent Server') + parser.add_argument('--host', default='127.0.0.1') + parser.add_argument('-p', '--port', default=9000, type=int) + args = parser.parse_args() + + server = WSGIServer((args.host, args.port), EchoWebSocketApplication(args.host, args.port)) + server.serve_forever() diff --git a/JUNK/WebSocket-for-Python-master/example/mocking_data_source.py b/JUNK/WebSocket-for-Python-master/example/mocking_data_source.py new file mode 100644 index 0000000..a830475 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/mocking_data_source.py @@ -0,0 +1,56 @@ +from ws4py import configure_logger +from ws4py.websocket import WebSocket +from ws4py.messaging import Message, TextMessage + +logger = configure_logger(stdout=True) + +class DataSource(object): + def __init__(self): + self.frames = set() + self.frame = None + self.remaining_bytes = None + + def setblocking(self, flag): + pass + + def feed(self, message): + if isinstance(message, Message): + message = message.single(mask=True) + else: + message = TextMessage(message).single(mask=True) + self.frames.add(message) + + def recv(self, size): + if not self.frame: + if not self.frames: + return b'' + self.frame = self.frames.pop() + self.remaining_bytes = self.frame + + current_bytes = self.remaining_bytes[:size] + self.remaining_bytes = self.remaining_bytes[size:] + + if self.remaining_bytes is b'': + self.frame = None + self.remaining_bytes = None + + return current_bytes + +class LogWebSocket(WebSocket): + def opened(self): + logger.info("WebSocket now ready") + + def closed(self, code=1000, reason="Burp, done!"): + logger.info("Terminated with reason '%s'" % reason) + + def received_message(self, m): + logger.info("Received message: %s" % m) + +if __name__ == '__main__': + source = DataSource() + ws = LogWebSocket(sock=source) + + source.feed(u'hello there') + source.feed(u'a bit more') + + ws.run() diff --git a/JUNK/WebSocket-for-Python-master/example/server.crt b/JUNK/WebSocket-for-Python-master/example/server.crt new file mode 100644 index 0000000..ea91ec5 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/server.crt @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIICATCCAWoCCQDYwq5UbWJ62zANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJB +VTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0 +cyBQdHkgTHRkMB4XDTEyMDMxNDIxMDMyMloXDTEzMDMxNDIxMDMyMlowRTELMAkG +A1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0 +IFdpZGdpdHMgUHR5IEx0ZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAu8ic +FFJZbp+U6L2HIEFPnblWGaECUQvBIjNAQqzmrMc7GY6BEAolC9g7mNi2D1JaYcxs +WgqjiypfW9tiOsybmoGDh2b+HsxkmtIWDM0anHCxbncJitCIrpqHp9Tu7Fvk8SrA +kKfu+3fQ/9ge8yDoa2t23/WKnG+nO7G/JuLyEJkCAwEAATANBgkqhkiG9w0BAQUF +AAOBgQCD5nRO8nzqlF/Q3wo+pJtHJjS88I6nZxhZTecmhZ3R4J6jo1V/RMysYYNt +zLK8m5QEv2P0SLmf5ysGam6Kd8PBGRxMWW1wbWnwxKyDoaso7vTK4eHzwrxgQk9w +pKnxiyt1k4P2vars13hdxAEQu11yJkzoMieHTyS+FxIUexUvTg== +-----END CERTIFICATE----- diff --git a/JUNK/WebSocket-for-Python-master/example/server.key b/JUNK/WebSocket-for-Python-master/example/server.key new file mode 100644 index 0000000..d961992 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/server.key @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXAIBAAKBgQC7yJwUUllun5TovYcgQU+duVYZoQJRC8EiM0BCrOasxzsZjoEQ +CiUL2DuY2LYPUlphzGxaCqOLKl9b22I6zJuagYOHZv4ezGSa0hYMzRqccLFudwmK +0Iiumoen1O7sW+TxKsCQp+77d9D/2B7zIOhra3bf9Yqcb6c7sb8m4vIQmQIDAQAB +AoGAfSF92BDT5WJToQ+Cdpzux8RTunpPB+CUTwzl2khK4oFUQYBzQlPwQcdSV1S5 +ZNZUweytmwaR2k9fAd/bwiDL4m/iGfmerwD1LPaWlYufKPEKG2XBzCAytNTuAU3J +/UXqlQK5Ee4aCcmVrXPsjkPgunQM4hs7qQFJI+s0vPPRYT0CQQD3nFys2ScKfszP +DLMQelWbo+kxqYrThfnCzsHFWA7fJXsyBX23CR8L1Dy5RcBxUa4I8VATwpfv8V7a +MQtDJciLAkEAwiVXGq0agnC5I3xEx2b14ezuXDBWK/Ld+QH6ocTFLxa6oy+YY4Sd +4dilZwWAgef8QBkXJbGxkbw4xKDxDo8L6wJAHSj26QwxwtSn/gI63Efr6QZmogib +ZsmyXjTHMRxrs+/QEFYBNhsG4ve9pvwF69J4smjoy0rxZbqBNyTrdJ7wfQJAFwzh +45vrytLhWFI3xEj4JoO/5RgkEwG50wemHzDCjI2xSRCskhw7toXHVYz0rffCHkYc +VnBbeccUIlxNYoIfUwJBAKdrypQG/vu6xvRm4Y70K+IiOxzOCIflyT8KYI106jqt +0LfwMlVmtiGUr3tj+GEyi+FlisEJ7xaEHIu41yrcR/4= +-----END RSA PRIVATE KEY----- diff --git a/JUNK/WebSocket-for-Python-master/example/static/css/style.css b/JUNK/WebSocket-for-Python-master/example/static/css/style.css new file mode 100644 index 0000000..825efaa --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/static/css/style.css @@ -0,0 +1,18 @@ + body { + margin: 0; + padding: 0; + text-align: left; + padding-top: 20px; +} + +#game { + background: #eee; + margin: auto; + overflow: hidden; + width: 900px; + height: 620px; + box-shadow: 8px 8px 12px #020100; +} + +#pong { +} \ No newline at end of file diff --git a/JUNK/WebSocket-for-Python-master/example/static/js/droidsensor.js b/JUNK/WebSocket-for-Python-master/example/static/js/droidsensor.js new file mode 100644 index 0000000..4fe8a42 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/static/js/droidsensor.js @@ -0,0 +1,113 @@ + +var initWebSocket = function() { + var ws = new WebSocket('ws://localhost:9000/ws'); + + $(window).unload(function() { + ws.close(); + }); + + ws.onmessage = function (evt) { + console.log(evt.data.split(' ')); + var sensors = evt.data.split(' '); + $("#canvas").clearCanvas(); + drawAzimuth(Math.floor(parseFloat(sensors[0]))); + drawPitch(Math.floor(parseFloat(sensors[1]))); + drawRoll(Math.floor(parseFloat(sensors[2]))); + drawX(Math.abs(Math.floor(parseFloat(sensors[3])))); + drawY(Math.abs(Math.floor(parseFloat(sensors[4])))); + drawZ(Math.abs(Math.floor(parseFloat(sensors[5])))); + }; +}; + +var initWebSocketAndSensors = function() { + var ws = new WebSocket('ws://localhost:9000/ws'); + + $(window).unload(function() { + ws.close(); + }); + + if (window.DeviceOrientationEvent) { + window.addEventListener("deviceorientation", + function(event) { + ws.send(event.alpha + " " + event.beta + " " + event.gamma + " 0 0 0"); + }, + false); + } +}; + +var drawArc = function(pos, value, label) { + $("#canvas").drawText( + { + strokeStyle: "#000", + text: label, + x: pos, y: 100 + } + ); + + $("#canvas").drawArc( + { + strokeStyle: "#F77B00", + strokeWidth: 15, + x: pos, y: 200, + radius: 50, + start: 0, end: value + } + ); +}; + +var drawSegment = function(lblx, lbly, x1, x2, y1, y2, label) { + $("#canvas").drawText( + { + strokeStyle: "#000", + text: label, + x: lblx, y: lbly + } + ); + + $("#canvas").drawLine( + { + strokeStyle: "#F77B00", + strokeWidth: 15, + x1: x1, y1: y1, + x2: x2, y2: y2 + } + ); +}; + +var drawAll = function() { + drawAzimuth(Math.floor(Math.random() * 360)); + drawPitch(Math.floor(Math.random() * 360)); + drawRoll(Math.floor(Math.random() * 360)); + drawX(Math.floor(Math.random() * 20)); + drawY(Math.floor(Math.random() * 20)); + drawZ(Math.floor(Math.random() * 20)); +}; + +var drawAzimuth = function(azimuth) { + var offset = 75; + drawArc(offset, azimuth, 'azimuth'); +}; + +var drawPitch = function(pitch) { + drawArc(200, pitch, 'pitch'); +}; + +var drawRoll = function(roll) { + drawArc(350, roll, 'roll'); +}; + +var drawX = function(x) { + x = 650 + Math.abs(Math.floor(200 * x / 20)); + drawSegment(880, 300, 650, x, 300, 300, 'x'); +}; + +var drawY = function(y) { + y = 300 - Math.abs(Math.floor(170 * y / 20)); + drawSegment(650, 100, 650, 650, 300, y, 'y'); +}; + +var drawZ = function(z) { + var x = 650 - Math.abs(Math.floor(130 * z / 20)); + var y = 300 + Math.abs(Math.floor(100 * z / 20)); + drawSegment(500, 410, 650, x, 300, y, 'z'); +}; diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/app.py b/JUNK/WebSocket-for-Python-master/example/websensors/app.py new file mode 100644 index 0000000..73f38c6 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/websensors/app.py @@ -0,0 +1,300 @@ +# -*- coding: utf-8 -*- +""" +WebSocket demo with a twist. + +The idea of this little demo is to demonstrate +how it can enable interesting functions when coupled with +other HTML5 features, such as Canvas. + +In this scenario, we create a canvas that we call a drawing +board. You can draw circles with various colors. A board +has a unique URL, every client connecting to that URL +can see whatever is drawn by other participants. All events +from one client are sent to other clients through +websockets. All other clients then draw on their view +events they receive. + +This ought to work well with any HTML5 capable browser such +as Chrome, Firefox, Opera. It even works well on Android using +Chrome. Internet Explorer users... well it may work as well. + +This demo uses: + +* CherryPy 3.2.5+ +* Mako +* jcanvas +* jquery +* HTML5boilerplate (via http://www.initializr.com/) + +Once you have installed those dependencies, simply run the +application as follow: + + $ python app.py --baseurl https://myhost/ --host 0.0.0.0 --port 8080 + +You can specify the base url which will be used to build the +URL to the board. For instance, a board's url will be: + + https://myhost/board/c866 + +""" +import json +import os.path +import tempfile +import time +import uuid + +try: + import wsaccel + wsaccel.patch_ws4py() +except ImportError: + pass + +from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool +from ws4py.websocket import WebSocket + +import cherrypy +from cherrypy.process import plugins +from mako.lookup import TemplateLookup +from mako.template import Template + +BASE_URL = None + +cwd_dir = os.path.normpath(os.path.abspath(os.path.dirname(__file__))) +bus = cherrypy.engine +lookup = TemplateLookup(directories=os.path.join(cwd_dir, 'templates'), + module_directory=os.path.join(cwd_dir, 'templates', '.cache'), + input_encoding='utf-8', + output_encoding='utf-8', + collection_size=20) + +class DrawingBoardWebSocketHandler(WebSocket): + """ + WebSocket handler that will dispatch drawing events + from this client to all other registered clients + on this board. + + An instance of this class is automatically created + when a client is connected. The `board_id` and + `participant_id` attributes are set outside of this + class, when the client is registered to the board. + """ + + def closed(self, code, reason): + """ + Called whenever the websocket connection is terminated, + whether abruptly or normally. + """ + bus.websockets.unregister_participant(self.board_id, + self.participant_id) + + def received_message(self, m): + """ + Received messages contain events from the + user interface, like coordinates. They are + dispatched to all registered participants on this + board. + """ + bus.websockets.broadcast_state(self.board_id, + self.participant_id, + m) + +class DrawingBoardWebSocketPlugin(WebSocketPlugin): + def __init__(self, bus): + """ + This plugin is the board controller. It keeps + track of all boards and their registered participants. + + You may access the global instance of this plugin + through the `bus.websockets` attribute. + """ + WebSocketPlugin.__init__(self, bus) + + # every 30s, we check if we have dead boards + # and we clean them + plugins.Monitor(bus, self.drop_dead_boards, 30).subscribe() + + # board index to quickly retrieve + # clients of a given board + self.boards = {} + + def drop_dead_boards(self): + """ + Iterate over all boards and unregister any + that seem to be unused anymore (because it doesn't + have any connected client anymore), or that + have been created for too long (no more than than 5mn + are allowed). + """ + for board_id in self.boards.copy(): + board = self.boards[board_id] + if not board['handlers']: + self.unregister_board(board_id) + elif (time.time() - board['created']) > 300: + for ws in board['handlers'].itervalues(): + if not ws.terminated: + ws.close(1001, "Board can't exist for more than 5mn") + self.unregister_board(board_id) + + def register_board(self, board_id): + """ + Register a board and initialize it + so that it'll accept participants. + """ + if board_id not in self.boards: + self.bus.log("Registering board %s" % board_id) + self.boards[board_id] = {'handlers': {}, 'created': time.time()} + + def unregister_board(self, board_id): + """ + Unregister a board and make it unusable. + """ + self.boards.pop(board_id, None) + + def register_participant(self, board_id, participant_id, ws_handler): + """ + Register a participant to the given board. + We also set the `board_id` and `participant_id` + attributes on the websocket handler instance. + """ + if board_id in self.boards: + self.bus.log("Registering participant %s to board %s" % (participant_id, board_id)) + ws_handler.board_id = board_id + ws_handler.participant_id = participant_id + self.boards[board_id]['handlers'][participant_id] = ws_handler + + def unregister_participant(self, board_id, participant_id): + """ + Unregister a participant from this board. + + Usually this is called automatically when the client + has closed its connection. + """ + if board_id in self.boards: + board = self.boards[board_id] + if participant_id in self.boards[board_id]: + board['handlers'].pop(participant_id, None) + self.bus.log("Unregistering participant %s from board %s" % (participant_id, board_id)) + + def broadcast_state(self, board_id, from_participant_id, state): + """ + Dispatch the given `state` to all registered participants + of the board (except the sender itself of course). + """ + if board_id not in self.boards: + return + + board = self.boards[board_id] + + for (participant_id, ws) in board['handlers'].iteritems(): + if from_participant_id != participant_id: + if not ws.terminated: + ws.send(state) + + +def render_template(template): + """ + Renders a mako template to HTML and + sets the CherryPy response's body with it. + """ + if cherrypy.response.status > 399: + return + + data = cherrypy.response.body or {} + template = lookup.get_template(template) + + if template and isinstance(data, dict): + cherrypy.response.body = template.render(**data) + +# Creating our tool so that they can be +# used below in the CherryPy applications +cherrypy.tools.render = cherrypy.Tool('before_finalize', render_template) +cherrypy.tools.websocket = WebSocketTool() + + +# Web Application +class SharedDrawingBoardApp(object): + @cherrypy.expose + @cherrypy.tools.render(template='index.html') + def index(self): + return {'boardid': str(uuid.uuid4())[:4], + 'baseurl': BASE_URL} + + @cherrypy.expose + @cherrypy.tools.render(template='board.html') + def board(self, board_id): + bus.websockets.register_board(board_id) + return {'boardid': board_id.replace('"', ''), + 'participantid': str(uuid.uuid4())[:6], + 'baseurl': BASE_URL, + 'basewsurl': BASE_URL.replace('http', 'ws')} + +# WebSocket endpoint +class SharedDrawingBoarWebSocketApp(object): + @cherrypy.expose + @cherrypy.tools.websocket(handler_cls=DrawingBoardWebSocketHandler) + def index(self, board_id, participant_id): + bus.websockets.register_participant(board_id, participant_id, + cherrypy.request.ws_handler) + +if __name__ == '__main__': + import argparse + from urlparse import urlparse + + parser = argparse.ArgumentParser() + parser.add_argument('--baseurl', default='http://0.0.0.0:8080') + parser.add_argument('--host') + parser.add_argument('-p', '--port', type=int) + parser.add_argument('--verbose', action="store_true") + args = parser.parse_args() + + BASE_URL = args.baseurl + BASE_URL = BASE_URL.rstrip('/') + url = urlparse(BASE_URL) + + bus.websockets = DrawingBoardWebSocketPlugin(bus) + bus.websockets.subscribe() + + cherrypy.config.update({ + 'server.socket_host': args.host or url.hostname, + 'server.socket_port': args.port or url.port, + 'server.thread_pool': 30, + 'log.screen': args.verbose, + 'log.access_file': os.path.join(cwd_dir, 'access.log'), + 'log.error_file': os.path.join(cwd_dir, 'error.log'), + 'tools.staticfile.root': cwd_dir, + 'tools.staticdir.root': cwd_dir, + 'tools.proxy.on': True, + 'tools.proxy.base': '%s://%s' % (url.scheme, url.netloc), + 'error_page.404': os.path.join(cwd_dir, "templates", "404.html") + }) + + app = SharedDrawingBoardApp() + app.ws = SharedDrawingBoarWebSocketApp() + + cherrypy.tree.mount(app, '/', { + '/': { + 'tools.encode.on': False, + 'tools.response_headers.on': True, + 'tools.response_headers.headers': [ + ('X-Frame-options', 'deny'), + ('X-XSS-Protection', '1; mode=block'), + ('X-Content-Type-Options', 'nosniff') + ] + }, + '/robots.txt': { + 'tools.staticfile.on': True, + 'tools.staticfile.filename': 'static/robots.txt' + }, + '/static/demos/drawing': { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': 'static' + } + }) + + bus.signals.subscribe() + bus.start() + bus.block() + + + + diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/static/css/style.css b/JUNK/WebSocket-for-Python-master/example/websensors/static/css/style.css new file mode 100644 index 0000000..c8feeca --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/websensors/static/css/style.css @@ -0,0 +1,10 @@ +#board { + background-color: #ccc; + display: block; +} + +#tools { + background-color: #000; + float: left; + display: block; +} \ No newline at end of file diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/static/css/style.min.css b/JUNK/WebSocket-for-Python-master/example/websensors/static/css/style.min.css new file mode 100644 index 0000000..ada6971 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/websensors/static/css/style.min.css @@ -0,0 +1 @@ +#board{background-color:#ccc;display:block}#tools{background-color:#000;float:left;display:block} \ No newline at end of file diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/static/js/drawingboard.js b/JUNK/WebSocket-for-Python-master/example/websensors/static/js/drawingboard.js new file mode 100644 index 0000000..bcf520b --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/websensors/static/js/drawingboard.js @@ -0,0 +1,198 @@ +(function ($) { + "use strict"; + + $.board = function(options) { + var board_id = options.board; + var participant_id = options.participant; + + var me = this; + var ws = null; + var board = null; + var tools = null; + var arena = null; + var colors = ['#ff1100', '#ffaa00', '#ffff11', + '#99dd00', '#22aaff', '#ff22aa']; + var color = "#ff1100"; + + var pos = {x: 0, y: 0}; + var accel = {x: 0, y: 0}; + + me.connect = function() { + ws = new WebSocket(options.url+'/ws/?board_id='+board_id+"&participant_id="+participant_id); + ws.onopen = function(e) {}; + ws.onclose = function(e) { + alert("Connection lost: " + e.reason); + }; + ws.onmessage = function(e) { + if (e.data == 'clear') { + me.stop_motion(); + board.clearCanvas(); + } else { + var state = $.parseJSON(e.data); + color = state.c; + me.draw(state.x, state.y); + } + }; + }; + + me.connected = function() { + if (ws && (ws.readyState == WebSocket.OPEN)) { + return true; + } + + return false; + }; + + me.send_state = function(x, y, c) { + if (me.connected()) { + ws.send('{"x": '+x+', "y": '+y+', "c": "'+c+'"}'); + }; + }; + + me.send_clear_board = function() { + if (me.connected()) { + ws.send('clear'); + }; + }; + + me.resize = function() { + board.attr('width', arena.width()-70); + board.attr('height', arena.height()); + board.attr('left', 70); + }; + + me.draw = function(x, y) { + board.drawArc({ + fillStyle: color, + x: x, + y: y, + radius: 20, + }); + }; + + me.setup = function() { + tools.drawRect({ + layer: true, + fillStyle: '#000', + strokeStyle: '#fff', + strokeWidth: 2, + cornerRadius: 10, + x: 30, y: 20, + width: 50, height: 30 + }); + + tools.drawText({ + layer: true, + fillStyle: '#fff', x: 30, y: 20, + fontSize: 14, + fontFamily: 'Verdana, sans-serif', + text: 'Clear', + click: function(layer) { + me.stop_motion(); + board.clearCanvas(); + me.send_clear_board(); + } + }); + + var offsety = 0; + for (var i=0; i arena.width())) { + accel.x = -accel.x; + } + if ((pos.y < 0) || (pos.y > arena.height())) { + accel.y = -accel.y; + } + + pos.x = pos.x + accel.x; + pos.y = pos.y - accel.y; + } else if (e.type == "mousemove") { + var offset = target.offset(); + pos.x = e.clientX - offset.left; + pos.y = e.clientY - offset.top; + } else if (e.type == "mousedown") { + var offset = target.offset(); + pos.x = e.clientX - offset.left; + pos.y = e.clientY - offset.top; + } + + if ((pos.x > 0) && (pos.y > 0)) { + me.send_state(pos.x, pos.y, color); + me.draw(pos.x, pos.y); + } + + e.preventDefault(); + e.stopPropagation(); + }; + + me.stop_motion = function() { + if (me.ismobile()) { + window.removeEventListener('devicemotion', me.motion, true); + } + } + + me.ismobile = function() { + // cheap way to decide if we're mobile + // not bullet proof but this is a demo + return (Modernizr.touch == true) && window.DeviceMotionEvent; + }; + + me.init = function() { + me.connect(); + + arena = $("#arena"); + board = $("#board"); + tools = $("#tools"); + me.resize(); + $(window).resize(me.resize); + + me.setup(); + + board.mousedown(function(e) { + me.motion(e); + + if (me.ismobile()) { + me.stop_motion(); // just in case + + // this is a bitch. Neither 'mouseup' nor 'touchend' + // are dispatched when the user release his finger + // from pressing on the screen. So, once started, this + // event will continue. sigh. + // Press on the "clear" button to stop that event. + window.addEventListener('devicemotion', me.motion, true); + } else { + board.mousemove(me.motion); + } + }); + + board.mouseup(function(e) { + board.unbind('mousemove'); + me.stop_motion(); + }); + }; + + me.init(); + }; +}(jQuery)); diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/static/js/drawingboard.min.js b/JUNK/WebSocket-for-Python-master/example/websensors/static/js/drawingboard.min.js new file mode 100644 index 0000000..8b6809f --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/websensors/static/js/drawingboard.min.js @@ -0,0 +1 @@ +(function($){"use strict";$.board=function(options){var board_id=options.board;var participant_id=options.participant;var me=this;var ws=null;var board=null;var tools=null;var arena=null;var colors=['#ff1100','#ffaa00','#ffff11','#99dd00','#22aaff','#ff22aa'];var color="#ff1100";var pos={x:0,y:0};var accel={x:0,y:0};me.connect=function(){ws=new WebSocket(options.url+'/ws/?board_id='+board_id+"&participant_id="+participant_id);ws.onopen=function(e){};ws.onclose=function(e){alert("Connection lost: "+e.reason);};ws.onmessage=function(e){if(e.data=='clear'){me.stop_motion();board.clearCanvas();}else{var state=$.parseJSON(e.data);color=state.c;me.draw(state.x,state.y);}};};me.connected=function(){if(ws&&(ws.readyState==WebSocket.OPEN))return true;return false;};me.send_state=function(x,y,c){if(me.connected())ws.send('{"x": '+x+', "y": '+y+', "c": "'+c+'"}');;};me.send_clear_board=function(){if(me.connected())ws.send('clear');;};me.resize=function(){board.attr('width',arena.width()-70);board.attr('height',arena.height());board.attr('left',70);};me.draw=function(x,y){board.drawArc({fillStyle:color,x:x,y:y,radius:20});};me.setup=function(){tools.drawRect({layer:true,fillStyle:'#000',strokeStyle:'#fff',strokeWidth:2,cornerRadius:10,x:30,y:20,width:50,height:30});tools.drawText({layer:true,fillStyle:'#fff',x:30,y:20,fontSize:14,fontFamily:'Verdana, sans-serif',text:'Clear',click:function(layer){me.stop_motion();board.clearCanvas();me.send_clear_board();}});var offsety=0;for(var i=0;iarena.width()))accel.x=-accel.x;if((pos.y<0)||(pos.y>arena.height()))accel.y=-accel.y;pos.x=pos.x+accel.x;pos.y=pos.y-accel.y;}else if(e.type=="mousemove"){var offset=target.offset();pos.x=e.clientX-offset.left;pos.y=e.clientY-offset.top;}else if(e.type=="mousedown"){var offset=target.offset();pos.x=e.clientX-offset.left;pos.y=e.clientY-offset.top;}if((pos.x>0)&&(pos.y>0)){me.send_state(pos.x,pos.y,color);me.draw(pos.x,pos.y);}e.preventDefault();e.stopPropagation();};me.stop_motion=function(){if(me.ismobile())window.removeEventListener('devicemotion',me.motion,true);};me.ismobile=function(){return(Modernizr.touch==true)&&window.DeviceMotionEvent;};me.init=function(){me.connect();arena=$("#arena");board=$("#board");tools=$("#tools");me.resize();$(window).resize(me.resize);me.setup();board.mousedown(function(e){me.motion(e);if(me.ismobile()){me.stop_motion();window.addEventListener('devicemotion',me.motion,true);}else board.mousemove(me.motion);});board.mouseup(function(e){board.unbind('mousemove');me.stop_motion();});};me.init();};}(jQuery)); \ No newline at end of file diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/static/robots.txt b/JUNK/WebSocket-for-Python-master/example/websensors/static/robots.txt new file mode 100644 index 0000000..ee2cc21 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/websensors/static/robots.txt @@ -0,0 +1,3 @@ +# robotstxt.org/ + +User-agent: * diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/initializr/apple-touch-icon-precomposed.png b/JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/initializr/apple-touch-icon-precomposed.png new file mode 100644 index 0000000000000000000000000000000000000000..1ea85edc6fd9d63f688509c47959a98e10a1c0d0 GIT binary patch literal 1226 zcmV;*1U37KP)0{{R3FC5Sl0000mP)t-s>x(1c zh9kRjBbi_#Y)B%5bVf#Ja6DFAFiBA1T=)mCp000D4 zNkl$qo(5J!YTix#(2} zlF4%|{W<2$_>;kO9d)5q8N6I-(yp>gF2OOW ziLG&5f^)FY;2>2QE+6)9sxoj*@~R9xlUil_rYSTq8H;7|bUB!>z?PVX5`&#In6JQU z!dQYG3?&|)|2+WX^mliXNGscx%kc0^jkuc%;gHt$?VbF^uQJ_ChFGPQy!~V^qhNA` zThW##KcCA+Q!u|yzeW?yE?8;HO=L)_vCnRU`E`0V_89|fQWN-7|JIoQ%~b}#w9;_5 zMos=^iOUhe)z~bJ`*)`c(Mr2lV>avJew|27TCqRZI2gIo7BMvz??Ex)R*n7>tiRH{ z8WrqTofy;T0MomN|0rQ=^nWt(yauKlimNe~#sJewV`<6u~%tgA<(1FU{G`scfkq0s?GTL7))^&PvsXkh6p zu+!z4m;JdoDkB^&6-~L=U~(XQlX$vRG}TB2bC?V`q^#bTV%%j?U23+wz~uOPhxabs zVEohKA-nC82Nu8O!qU0SH-S~hv0B>ZbctI`YHH`Q_`!T-fzONFD6$4&7Dqs#$LVOR(=jQWMB7;Ww%GpglL~?oej=zl07Zhw-`OJl7XXXY5?Q3K7gM z3&ca8E_b~{krp}pr+uV9U!Zeos*|zE;jMjypUI%R;Aq zE+1dIJ&PQ}CXwp+=Te>SMULUJu&2I!`jfni97DDLaq9p7(j9x31Td|Ad+N)`KQ0_D zF=Fz=)Q?Q4;qto5(W$p}8i%sW!{3@!5<`)ej75GC%;4JFcxvlkS6E8Y_x;?x+`BviV9;aRjMgZ8M*!jgkRrFqSI9;F zHyfX@Az|AvVmn~YWWZP`0&JWEY~BFm?*Vq}VD7&_%x%MP$p`D`4JMC!K|B7pt?Mmp zUJAB7rxMXS6=!P+AtLU9V)J#61WPxwipRXCHO{BJ`l{m53#=t97a!znv~vfmr|AaP zRGIT7#0FyJy3Z*hL{GQp-0TRhX8UzZ)+>%?mK0^goaX4Q;x',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f #mq-test-1 { width: 42px; }';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); + +/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ +(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this); \ No newline at end of file diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/jcanvas/jcanvas.min.js b/JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/jcanvas/jcanvas.min.js new file mode 100644 index 0000000..6079b8b --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/websensors/static/vendors/jcanvas/jcanvas.min.js @@ -0,0 +1,69 @@ +/* + jCanvas v14.03.27 + Copyright 2014 Caleb Evans + Released under the MIT license +*/ +(function(f,wa,xa,Ua,da,fa,na,n,w,h,k){function K(d){var c;if(L.future.inheritance)for(c in d)d.hasOwnProperty(c)&&(this[c]=d[c]);else X(this,d)}function L(d){var c;if(d)X(aa,d);else for(c in aa)aa.hasOwnProperty(c)&&delete aa[c];na&&na.warn&&!ya.jCanvas&&(ya.jCanvas=n,na.warn("The jCanvas() method has been deprecated and will be removed in a future release."));return this}function za(){}function ka(d){return"string"===ba(d)}function H(d){return d&&d.getContext?d.getContext("2d"):h}function la(d){d= +X({},d);d.masks=d.masks.slice(0);return d}function ga(d,c){var a;d.save();a=la(c.transforms);c.savedTransforms.push(a)}function Aa(d,c,a,b){a[b]&&(ea(a[b])?c[b]=a[b].call(d,a):c[b]=a[b])}function S(d,c,a){Aa(d,c,a,"fillStyle");Aa(d,c,a,"strokeStyle");c.lineWidth=a.strokeWidth;a.rounded?c.lineCap=c.lineJoin="round":(c.lineCap=a.strokeCap,c.lineJoin=a.strokeJoin,c.miterLimit=a.miterLimit);a.strokeDash&&(c.setLineDash(a.strokeDash),c.webkitLineDash=c.mozDash=a.strokeDash,c.lineDashOffset=c.webkitLineDashOffset= +c.mozDashOffset=a.strokeDashOffset);c.shadowOffsetX=a.shadowX;c.shadowOffsetY=a.shadowY;c.shadowBlur=a.shadowBlur;c.shadowColor=a.shadowColor;c.globalAlpha=a.opacity;c.globalCompositeOperation=a.compositing;a.imageSmoothing&&(c.webkitImageSmoothingEnabled=c.mozImageSmoothingEnabled=a.imageSmoothing)}function Ba(d,c,a){a.mask&&(a.autosave&&ga(d,c),d.clip(),c.transforms.masks.push(a._args))}function Y(d,c,a){a.closed&&c.closePath();a.shadowStroke&&0!==a.strokeWidth?(c.stroke(),c.fill(),c.shadowColor= +"transparent",c.shadowBlur=0,c.stroke()):(c.fill(),"transparent"!==a.fillStyle&&(c.shadowColor="transparent"),0!==a.strokeWidth&&c.stroke());a.closed||c.closePath();a._transformed&&c.restore();a.mask&&(d=E(d),Ba(c,d,a))}function R(d,c,a,b,g){a._toRad=a.inDegrees?C/180:1;a._transformed=n;c.save();a.fromCenter||a._centered||b===k||(g===k&&(g=b),a.x+=b/2,a.y+=g/2,a._centered=n);a.rotate&&Ca(c,a,h);1===a.scale&&1===a.scaleX&&1===a.scaleY||Da(c,a,h);(a.translate||a.translateX||a.translateY)&&Ea(c,a,h)} +function E(d){var c=ca.dataCache,a;c._canvas===d&&c._data?a=c._data:(a=f.data(d,"jCanvas"),a||(a={canvas:d,layers:[],layer:{names:{},groups:{}},eventHooks:{},intersecting:[],lastIntersected:h,cursor:f(d).css("cursor"),drag:{layer:h,dragging:w},event:{type:h,x:h,y:h},events:{},transforms:la(oa),savedTransforms:[],animating:w,animated:h,pixelRatio:1,scaled:w},f.data(d,"jCanvas",a)),c._canvas=d,c._data=a);return a}function Fa(d,c,a){for(var b in L.events)L.events.hasOwnProperty(b)&&(a[b]||a.cursors&& +a.cursors[b])&&Ga(d,c,a,b)}function Ga(d,c,a,b){window.ontouchstart!==k&&Z.touchEvents[b]&&(b=Z.touchEvents[b]);L.events[b](d,c);a._event=n}function Ha(d,c,a){var b,g,e;if(a.draggable||a.cursors){b=["mousedown","mousemove","mouseup"];for(e=0;ea&&(d.now[a]=Xa(d.now[a]));1!==d.start[3]||1!==d.end[3]?d.now="rgba("+d.now.join(",")+")":(d.now.slice(0,3),d.now="rgb("+d.now.join(",")+")");d.elem.nodeName?d.elem.style[d.prop]=d.now:d.elem[d.prop]=d.now}function Ya(d){L.events[d]=function(c, +a){var b,g;g=a.event;b="mouseover"===d||"mouseout"===d?"mousemove":d;a.events[b]||(c.bind(b+".jCanvas",function(a){g.x=a.offsetX;g.y=a.offsetY;g.type=b;g.event=a;c.drawLayers({resetFire:n});a.preventDefault()}),a.events[b]=n)}}function T(d,c,a){var b,g,e,l;if(a=a._args)d=E(d),b=d.event,b.x!==h&&b.y!==h&&(e=b.x*d.pixelRatio,l=b.y*d.pixelRatio,g=c.isPointInPath(e,l)||c.isPointInStroke&&c.isPointInStroke(e,l)),c=d.transforms,a.eventX=a.mouseX=b.x,a.eventY=a.mouseY=b.y,a.event=b.event,b=d.transforms.rotate, +e=a.eventX,l=a.eventY,0!==b?(a._eventX=e*P(-b)-l*U(-b),a._eventY=l*P(-b)+e*U(-b)):(a._eventX=e,a._eventY=l),a._eventX/=c.scaleX,a._eventY/=c.scaleY,g&&d.intersecting.push(a),a.intersects=g}function Ca(d,c,a){c._toRad=c.inDegrees?C/180:1;d.translate(c.x,c.y);d.rotate(c.rotate*c._toRad);d.translate(-c.x,-c.y);a&&(a.rotate+=c.rotate*c._toRad)}function Da(d,c,a){1!==c.scale&&(c.scaleX=c.scaleY=c.scale);d.translate(c.x,c.y);d.scale(c.scaleX,c.scaleY);d.translate(-c.x,-c.y);a&&(a.scaleX*=c.scaleX,a.scaleY*= +c.scaleY)}function Ea(d,c,a){c.translate&&(c.translateX=c.translateY=c.translate);d.translate(c.translateX,c.translateY);a&&(a.translateX+=c.translateX,a.translateY+=c.translateY)}function Ka(d){for(;0>d;)d+=2*C;return d}function La(d,c,a,b){var g,e,l,f,A,t,h;a===b?h=t=0:(t=a.x,h=a.y);b.inDegrees||360!==b.end||(b.end=2*C);b.start*=a._toRad;b.end*=a._toRad;b.start-=C/2;b.end-=C/2;A=C/180*1;b.ccw&&(A*=-1);g=b.x+b.radius*P(b.start+A);e=b.y+b.radius*U(b.start+A);l=b.x+b.radius*P(b.start);f=b.y+b.radius* +U(b.start);ha(d,c,a,b,g,e,l,f);c.arc(b.x+t,b.y+h,b.radius,b.start,b.end,b.ccw);g=b.x+b.radius*P(b.end+A);A=b.y+b.radius*U(b.end+A);e=b.x+b.radius*P(b.end);l=b.y+b.radius*U(b.end);ia(d,c,a,b,e,l,g,A)}function Ma(d,c,a,b,g,e,l,f){var A,t;b.arrowRadius&&!a.closed&&(t=Za(f-e,l-g),t-=C,d=a.strokeWidth*P(t),A=a.strokeWidth*U(t),a=l+b.arrowRadius*P(t+b.arrowAngle/2),g=f+b.arrowRadius*U(t+b.arrowAngle/2),e=l+b.arrowRadius*P(t-b.arrowAngle/2),b=f+b.arrowRadius*U(t-b.arrowAngle/2),c.moveTo(a-d,g-A),c.lineTo(l- +d,f-A),c.lineTo(e-d,b-A),c.moveTo(l-d,f-A),c.lineTo(l+d,f+A),c.moveTo(l,f))}function ha(d,c,a,b,g,e,l,f){b._arrowAngleConverted||(b.arrowAngle*=a._toRad,b._arrowAngleConverted=n);b.startArrow&&Ma(d,c,a,b,g,e,l,f)}function ia(d,c,a,b,g,e,l,f){b._arrowAngleConverted||(b.arrowAngle*=a._toRad,b._arrowAngleConverted=n);b.endArrow&&Ma(d,c,a,b,g,e,l,f)}function Na(d,c,a,b){var g,e,l;g=2;ha(d,c,a,b,b.x2+a.x,b.y2+a.y,b.x1+a.x,b.y1+a.y);for(b.x1!==k&&b.y1!==k&&c.moveTo(b.x1+a.x,b.y1+a.y);n;)if(e=b["x"+g],l= +b["y"+g],e!==k&&l!==k)c.lineTo(e+a.x,l+a.y),g+=1;else break;g-=1;ia(d,c,a,b,b["x"+(g-1)]+a.x,b["y"+(g-1)]+a.y,b["x"+g]+a.x,b["y"+g]+a.y)}function Oa(d,c,a,b){var g,e,l,f,A;g=2;ha(d,c,a,b,b.cx1+a.x,b.cy1+a.y,b.x1+a.x,b.y1+a.y);for(b.x1!==k&&b.y1!==k&&c.moveTo(b.x1+a.x,b.y1+a.y);n;)if(e=b["x"+g],l=b["y"+g],f=b["cx"+(g-1)],A=b["cy"+(g-1)],e!==k&&l!==k&&f!==k&&A!==k)c.quadraticCurveTo(f+a.x,A+a.y,e+a.x,l+a.y),g+=1;else break;g-=1;ia(d,c,a,b,b["cx"+(g-1)]+a.x,b["cy"+(g-1)]+a.y,b["x"+g]+a.x,b["y"+g]+a.y)} +function Pa(d,c,a,b){var g,e,l,f,A,t,h,J;g=2;e=1;ha(d,c,a,b,b.cx1+a.x,b.cy1+a.y,b.x1+a.x,b.y1+a.y);for(b.x1!==k&&b.y1!==k&&c.moveTo(b.x1+a.x,b.y1+a.y);n;)if(l=b["x"+g],f=b["y"+g],A=b["cx"+e],t=b["cy"+e],h=b["cx"+(e+1)],J=b["cy"+(e+1)],l!==k&&f!==k&&A!==k&&t!==k&&h!==k&&J!==k)c.bezierCurveTo(A+a.x,t+a.y,h+a.x,J+a.y,l+a.x,f+a.y),g+=1,e+=2;else break;g-=1;e-=2;ia(d,c,a,b,b["cx"+(e+1)]+a.x,b["cy"+(e+1)]+a.y,b["x"+g]+a.x,b["y"+g]+a.y)}function Qa(d,c,a){c*=d._toRad;c-=C/2;return a*P(c)}function Ra(d,c, +a){c*=d._toRad;c-=C/2;return a*U(c)}function Sa(d,c,a,b){var g,e,l,f,h,t,$;a===b?h=f=0:(f=a.x,h=a.y);g=1;e=f=t=b.x+f;l=h=$=b.y+h;ha(d,c,a,b,e+Qa(a,b.a1,b.l1),l+Ra(a,b.a1,b.l1),e,l);for(b.x!==k&&b.y!==k&&c.moveTo(e,l);n;)if(e=b["a"+g],l=b["l"+g],e!==k&&l!==k)f=t,h=$,t+=Qa(a,e,l),$+=Ra(a,e,l),c.lineTo(t,$),g+=1;else break;ia(d,c,a,b,f,h,t,$)}function sa(d,c,a){isNaN(Number(a.fontSize))||(a.fontSize+="px");c.font=a.fontStyle+" "+a.fontSize+" "+a.fontFamily}function ta(d,c,a,b){var g,e;g=ca.propCache; +if(g.text===a.text&&g.fontStyle===a.fontStyle&&g.fontSize===a.fontSize&&g.fontFamily===a.fontFamily&&g.maxWidth===a.maxWidth&&g.lineHeight===a.lineHeight)a.width=g.width,a.height=g.height;else{a.width=c.measureText(b[0]).width;for(e=1;ea.width&&(a.width=g);c=d.style.fontSize;d.style.fontSize=a.fontSize;a.height=fa(f.css(d,"fontSize"))*b.length*a.lineHeight;d.style.fontSize=c}}function Ta(d,c){var a=c.maxWidth,b=c.text.split("\n"),g=[],e,l,f,h,t;for(f=0;f< +b.length;f+=1){h=b[f];t=h.split(" ");e=[];l="";if(1===t.length||d.measureText(h).widtha&&(""!==l&&e.push(l),l=""),l+=t[h],h!==t.length-1&&(l+=" ");e.push(l)}g=g.concat(e.join("\n").replace(/( (\n))|( $)/gi,"$2").split("\n"))}return g}var ma,aa,X=f.extend,ja=f.inArray,ba=f.type,ea=f.isFunction,C=da.PI,Xa=da.round,$a=da.abs,U=da.sin,P=da.cos,Za=da.atan2,ua=Ua.prototype.slice,ab=f.event.fix,Z={},ca={dataCache:{},propCache:{},imageCache:{}}, +oa={rotate:0,scaleX:1,scaleY:1,translateX:0,translateY:0,masks:[]},ya={jCanvas:w},W={};f.fn.jCanvas=L;L.events={};L.eventHooks={};L.future={inheritance:!1};ma=new function(){X(this,{align:"center",arrowAngle:90,arrowRadius:0,autosave:n,baseline:"middle",bringToFront:w,ccw:w,closed:w,compositing:"source-over",concavity:0,cornerRadius:0,count:1,cropFromCenter:n,crossOrigin:"",cursors:h,disableEvents:w,draggable:w,dragGroups:h,groups:h,data:h,dx:h,dy:h,end:360,eventX:h,eventY:h,fillStyle:"transparent", +fontStyle:"normal",fontSize:"12pt",fontFamily:"sans-serif",fromCenter:n,height:h,imageSmoothing:n,inDegrees:n,index:h,lineHeight:1,layer:w,mask:w,maxWidth:h,miterLimit:10,name:h,opacity:1,r1:h,r2:h,radius:0,repeat:"repeat",respectAlign:w,rotate:0,rounded:w,scale:1,scaleX:1,scaleY:1,shadowBlur:0,shadowColor:"transparent",shadowStroke:w,shadowX:0,shadowY:0,sHeight:h,sides:0,source:"",letterSpacing:h,spread:0,start:0,strokeCap:"butt",strokeDash:h,strokeDashOffset:0,strokeJoin:"miter",strokeStyle:"transparent", +strokeWidth:1,sWidth:h,sx:h,sy:h,text:"",translate:0,translateX:0,translateY:0,type:h,visible:n,width:h,x:0,y:0})};za.prototype=ma;aa=new za;K.prototype=aa;L.extend=function(d){d.name&&(d.props&&X(ma,d.props),f.fn[d.name]=function a(b){var g,e,l,f;for(e=0;ed&&(d=c.length+d),b=c[d];else if("regexp"===g)for(a=0;ac&&(c=e.length+c),l.index=c,O(a,g,l,"move");return this};f.fn.removeLayer=function(d){var c,a,b,g,e;for(a=0;aD.width&&(M=F,F=y,y=M),0>D.height&&(M=p,p=s,s=M),0>y-F-2*x&&(x=(y-F)/2),0>s-p-2*x&&(x=(s-p)/2),k.moveTo(F+x,p),k.lineTo(y-x,p),k.arc(y-x,p+x,x,3*C/2,2*C,w),k.lineTo(y,s-x),k.arc(y-x,s-x,x,0,C/2,w),k.lineTo(F+x,s),k.arc(F+x,s-x,x,C/2,C,w),k.lineTo(F,p+x),k.arc(F+x,p+x,x,C,3*C/2,w),D.closed=n):k.rect(F,p,D.width,D.height)),T(this[h],k,D),Y(this[h],k,D));return this};f.fn.drawArc=function t(f){var h,k,F;for(h=0;hq.sy-q.sHeight/2&&(q.sy=q.sHeight/2),q.sy+q.sHeight/2>G.height&&(q.sy=G.height-q.sHeight/2),0>q.sx-q.sWidth/2&&(q.sx=q.sWidth/2),q.sx+q.sWidth/2>G.width&&(q.sx=G.width-q.sWidth/2),R(k,m,q,q.width,q.height),m.drawImage(G,q.sx-q.sWidth/2,q.sy-q.sHeight/2,q.sWidth,q.sHeight,q.x-q.width/ +2,q.y-q.height/2,q.width,q.height)):(R(k,m,q,q.width,q.height),m.drawImage(G,q.x-q.width/2,q.y-q.height/2,q.width,q.height));m.beginPath();m.rect(q.x-q.width/2,q.y-q.height/2,q.width,q.height);T(k,m,q);m.closePath();q._transformed&&m.restore();Ba(m,u,q);q.layer?O(v,u,r,"load"):q.load&&q.load.call(v[0],r);q.layer&&(r._masks=u.transforms.masks.slice(0),q._next&&v.drawLayers({clear:w,resetFire:n,index:q._next}))}}var m,v,V,r,B,C,G,va,L,P=ca.imageCache;for(v=0;v")[0],n.width=v.width,n.height=v.height,k=H(n),B.call(n,k),z()):(k= +B.getContext,B.src||k?n=B:(n=new xa,n.crossOrigin=v.crossOrigin,n.src=B),n.complete||k?z():(n.onload=z(),n.src=n.src))):r=h;return r};f.fn.createGradient=function(f){var n,u=[],m,v,w,r,B,C,G;f=new K(f);if(n=H(this[0])){f.x1=f.x1||0;f.y1=f.y1||0;f.x2=f.x2||0;f.y2=f.y2||0;n=f.r1!==h&&f.r2!==h?n.createRadialGradient(f.x1,f.y1,f.r1,f.x2,f.y2,f.r2):n.createLinearGradient(f.x1,f.y1,f.x2,f.y2);for(r=1;f["c"+r]!==k;r+=1)f["s"+r]!==k?u.push(f["s"+r]):u.push(h);m=u.length;u[0]===h&&(u[0]=0);u[m-1]===h&&(u[m- +1]=1);for(r=0;rw&&(u[B]=u[r])}else u[r]===h&&(G+=1,u[r]=v+(w-v)/C*G);n.addColorStop(u[r],f["c"+(r+1)])}}else n=h;return n};f.fn.setPixels=function z(f){var k,n,w,r,B,C,G,E,L;for(n=0;n")[0].getContext!==k; +X(L,{defaults:ma,prefs:aa,setGlobalProps:S,transformShape:R,detectEvents:T,closePath:Y,setCanvasFont:sa,measureText:ta});f.jCanvas=L})(jQuery,document,Image,Array,Math,parseFloat,console,!0,!1,null); diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/templates/.cache/board.html.py b/JUNK/WebSocket-for-Python-master/example/websensors/templates/.cache/board.html.py new file mode 100644 index 0000000..5bd9f8b --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/websensors/templates/.cache/board.html.py @@ -0,0 +1,33 @@ +# -*- coding:utf-8 -*- +from mako import runtime, filters, cache +UNDEFINED = runtime.UNDEFINED +__M_dict_builtin = dict +__M_locals_builtin = locals +_magic_number = 9 +_modified_time = 1396804512.086294 +_enable_loop = True +_template_filename = '/home/sylvain/Dev/projects/WebSocket-for-Python/example/websensors/templates/board.html' +_template_uri = 'board.html' +_source_encoding = 'utf-8' +_exports = [] + + +def render_body(context,**pageargs): + __M_caller = context.caller_stack._push_frame() + try: + __M_locals = __M_dict_builtin(pageargs=pageargs) + boardid = context.get('boardid', UNDEFINED) + participantid = context.get('participantid', UNDEFINED) + __M_writer = context.writer() + # SOURCE LINE 1 + __M_writer(u'\n\n\n\n \n \n \n \n Mobile remote control\n \n \n \n \n \n\n \n \n \n\n \n \n \n \n\n
\n\t \n\t \n
\n\n \n\t\n \n \n \n \n\n') + return '' + finally: + context.caller_stack._pop_frame() + + diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/templates/.cache/index.html.py b/JUNK/WebSocket-for-Python-master/example/websensors/templates/.cache/index.html.py new file mode 100644 index 0000000..28ac0d3 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/websensors/templates/.cache/index.html.py @@ -0,0 +1,32 @@ +# -*- coding:utf-8 -*- +from mako import runtime, filters, cache +UNDEFINED = runtime.UNDEFINED +__M_dict_builtin = dict +__M_locals_builtin = locals +_magic_number = 9 +_modified_time = 1396804510.682649 +_enable_loop = True +_template_filename = '/home/sylvain/Dev/projects/WebSocket-for-Python/example/websensors/templates/index.html' +_template_uri = 'index.html' +_source_encoding = 'utf-8' +_exports = [] + + +def render_body(context,**pageargs): + __M_caller = context.caller_stack._push_frame() + try: + __M_locals = __M_dict_builtin(pageargs=pageargs) + boardid = context.get('boardid', UNDEFINED) + __M_writer = context.writer() + # SOURCE LINE 1 + __M_writer(u'\n\n\n\n \n \n \n \n Shared drawing board\n \n \n \n \n \n\n \n \n\n \n \n \n \n\n
\n
\n

shared drawing board

\n
\n
\n\n
\n\n \n\n \n \n \n\n') + return '' + finally: + context.caller_stack._pop_frame() + + diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/templates/404.html b/JUNK/WebSocket-for-Python-master/example/websensors/templates/404.html new file mode 100644 index 0000000..e3a1948 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/websensors/templates/404.html @@ -0,0 +1,85 @@ + + + + + Page Not Found :( + + + +
+

Not found :(

+

Sorry, but the page you were trying to view does not exist.

+

It looks like this was the result of either:

+
    +
  • a mistyped address
  • +
  • an out-of-date link
  • +
+
+ + diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/templates/board.html b/JUNK/WebSocket-for-Python-master/example/websensors/templates/board.html new file mode 100644 index 0000000..8cb2caf --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/websensors/templates/board.html @@ -0,0 +1,41 @@ + + + + + + + + + Mobile remote control + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + diff --git a/JUNK/WebSocket-for-Python-master/example/websensors/templates/index.html b/JUNK/WebSocket-for-Python-master/example/websensors/templates/index.html new file mode 100644 index 0000000..152bacf --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/example/websensors/templates/index.html @@ -0,0 +1,113 @@ + + + + + + + + + Shared drawing board + + + + + + + + + + + + + + +
+
+

shared drawing board

+
+
+ +
+
+ +
+
+

what's this?

+

This demo will demonstrate a fun usage of WebSocket + and canvases. + The idea is that you will share a drawing board with other + users or devices and each time someone will draw something onto + the canvas, all other participants will see the drawing in near real-time + on their side too. +

+

Please use the link below to share a drawing board:

+

${baseurl}/board/${boardid}

+

Note that each board can last only 5mn as this for demoing purpose.

+
+
+

how does it work?

+

The link above leads you to a page which will simply display + two HTML5 canvases. One on the left acting as a simple toolbar + to change your brush color and clear the whole drawing board. The + canvas on the right is the drawing board where you can draw circles + by clicking on your left button (or your finger on a mobile device).

+

In addition, in the background, a websocket connection is initialized + with the server. That connection will be used to broadcast any drawing + action you perform on your board.

+

Any other connected participant will then "see" whatever you draw on your + board. Conversely, you will see what they draw as well.

+

The demo is hosted on a WebFaction + shared host behind a Custom (websocket) + application. This kind of application sets up a nginx frontend with the + websocket module enabled. The demo simply runs a Python application listening + on that port.

+

Note that on your mobile, the device motion + is used whenever available. Press on the screen once and this ought + to start the motion support. You will have to press again to stop it (or + click on the Clean button).

+
+
+

where does it work?

+

This demo relies on modern browsers support for HTML5 features such as + websocket and + canvas.

+

It has been tested successfully on:

+
    +
  • Chromium 33.0.1750.152
  • +
  • Firefox 28
  • +
  • Chrome 34.0.1847.114 on Android 4.2.2
  • +
  • Opera 12
  • +
  • Internet Explorer 11
  • +
+

Note that the demo only supports RFC 6455 which is the + official version of the WebSocket protocol. Some older devices + implement other draft versions that this demo does not speak. +

+

what tools are used for this demo?

+

This demo uses the following libraries and tools:

+
    +
  • CherryPy as the application server running on Python
  • +
  • ws4py as the websocket server endpoint
  • +
  • wsaccel which uses Cython to improve key parts of ws4py
  • +
  • jcanvas for canvas manipulation and rendering
  • +
  • Initializr for the HTML5 web page that you see
  • +
+

The source code of this demo can be found here + as part of the ws4py package.

+
+
+ +
+
+ + + + + + diff --git a/JUNK/WebSocket-for-Python-master/requirements/py2kreqs.txt b/JUNK/WebSocket-for-Python-master/requirements/py2kreqs.txt new file mode 100644 index 0000000..30be8ff --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/requirements/py2kreqs.txt @@ -0,0 +1,7 @@ +CherryPy>=5.5.0 +tornado>=4.2.3 +greenlet>=0.4.9 +mock>=2.0.0 +Cython>=0.22.1 +gevent>=1.1.1 +pytest>=3.0.7 \ No newline at end of file diff --git a/JUNK/WebSocket-for-Python-master/requirements/py3kreqs.txt b/JUNK/WebSocket-for-Python-master/requirements/py3kreqs.txt new file mode 100644 index 0000000..e8a6149 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/requirements/py3kreqs.txt @@ -0,0 +1,7 @@ +CherryPy>=5.5.0 +tornado>=4.2.3 +mock>=2.0.0 +asyncio>=3.4.3 +Cython>=0.22.1 +gevent>=1.1.1 +pytest>=3.0.4 \ No newline at end of file diff --git a/JUNK/WebSocket-for-Python-master/requirements/rtd.txt b/JUNK/WebSocket-for-Python-master/requirements/rtd.txt new file mode 100644 index 0000000..ffbc30c --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/requirements/rtd.txt @@ -0,0 +1,5 @@ +https://bitbucket.org/cherrypy/cherrypy/downloads/CherryPy-3.2.3.tar.gz +Sphinx==1.1.3 +funcparserlib==0.3.5 +sphinxcontrib-seqdiag +sphinxcontrib-blockdiag diff --git a/JUNK/WebSocket-for-Python-master/setup.py b/JUNK/WebSocket-for-Python-master/setup.py new file mode 100644 index 0000000..c9452fa --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/setup.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +import os, os.path +from glob import iglob +import sys +import re +try: + from setuptools import setup +except ImportError: + from distutils.core import setup +from distutils.command.build_py import build_py + +class buildfor2or3(build_py): + def find_package_modules(self, package, package_dir): + """ + Lookup modules to be built before install. Because we + only use a single source distribution for Python 2 and 3, + we want to avoid specific modules to be built and deployed + on Python 2.x. By overriding this method, we filter out + those modules before distutils process them. + + This is in reference to issue #123. + """ + modules = build_py.find_package_modules(self, package, package_dir) + amended_modules = [] + for (package_, module, module_file) in modules: + if sys.version_info < (3,): + if module in ['async_websocket', 'tulipserver']: + continue + amended_modules.append((package_, module, module_file)) + return amended_modules + + +# extract version +_version_re = re.compile(r"__version__\s+=\s+\"(.*)\"") +with open("ws4py/__init__.py", "rb") as f: + version = str(_version_re.search( + f.read().decode('utf-8')).group(1)) + + +setup(name = "ws4py", + version = version, + description = "WebSocket client and server library for Python 2 and 3 as well as PyPy", + maintainer = "Sylvain Hellegouarch", + maintainer_email = "sh@defuze.org", + url = "https://github.com/Lawouach/WebSocket-for-Python", + download_url = "https://pypi.python.org/pypi/ws4py", + packages = ['ws4py', 'ws4py.client', 'ws4py.server'], + platforms = ["any"], + license = 'BSD', + long_description = "WebSocket client and server library for Python 2 and 3 as well as PyPy", + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Framework :: CherryPy', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', + 'Topic :: Communications', + 'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware', + 'Topic :: Internet :: WWW/HTTP :: WSGI :: Server', + 'Topic :: Software Development :: Libraries :: Python Modules' + ], + cmdclass=dict(build_py=buildfor2or3) + ) diff --git a/JUNK/WebSocket-for-Python-master/test/__init__.py b/JUNK/WebSocket-for-Python-master/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/JUNK/WebSocket-for-Python-master/test/autobahn_test_servers.py b/JUNK/WebSocket-for-Python-master/test/autobahn_test_servers.py new file mode 100644 index 0000000..3e33f82 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/test/autobahn_test_servers.py @@ -0,0 +1,277 @@ +# -*- coding: utf-8 -*- +import logging + +def run_cherrypy_server(host="127.0.0.1", port=9008): + """ + Runs a CherryPy server on Python 2.x. + """ + import cherrypy + + from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool + from ws4py.websocket import EchoWebSocket + + cherrypy.config.update({'server.socket_host': host, + 'server.socket_port': port, + 'engine.autoreload.on': False, + 'log.screen': False}) + WebSocketPlugin(cherrypy.engine).subscribe() + cherrypy.tools.websocket = WebSocketTool() + + class Root(object): + @cherrypy.expose + def index(self): + pass + + config = { + '/': { + 'tools.encode.on': False, + 'tools.websocket.on': True, + 'tools.websocket.handler_cls': EchoWebSocket + } + } + logger = logging.getLogger('autobahn_testsuite') + logger.warning("Serving CherryPy server on %s:%s" % (host, port)) + + cherrypy.quickstart(Root(), '/', config) + +def run_cherrypy_server_with_wsaccel(host="127.0.0.1", port=9006): + """ + Runs a CherryPy server on Python 2.x with + a cython driver for some internal operations. + """ + import wsaccel + wsaccel.patch_ws4py() + run_cherrypy_server(host, port) + + +def run_cherrypy_server_with_python3(host="127.0.0.1", port=9004): + """ + Runs a CherryPy server on Python 3.x + """ + import wsaccel + wsaccel.patch_ws4py() + run_cherrypy_server(host, port) + + +def run_cherrypy_server_with_pypy(host="127.0.0.1", port=9005): + """ + Runs a CherryPy server on PyPy + """ + run_cherrypy_server(host, port) + + +def run_gevent_server(host="127.0.0.1", port=9001): + """ + Runs a gevent server on Python 2.x + """ + from gevent import monkey; monkey.patch_all() + import wsaccel + wsaccel.patch_ws4py() + from ws4py.websocket import EchoWebSocket + from ws4py.server.geventserver import WebSocketWSGIApplication, WSGIServer + + server = WSGIServer((host, port), WebSocketWSGIApplication(handler_cls=EchoWebSocket)) + logger = logging.getLogger('autobahn_testsuite') + logger.warning("Serving gevent server on %s:%s" % (host, port)) + server.serve_forever() + + +def run_python3_asyncio(host="127.0.0.1", port=9009): + """ + Runs a server using asyncio and Python 3.3+ + """ + import asyncio + import wsaccel + wsaccel.patch_ws4py() + from ws4py.async_websocket import EchoWebSocket + from ws4py.server.tulipserver import WebSocketProtocol + + loop = asyncio.get_event_loop() + + def start_server(): + proto_factory = lambda: WebSocketProtocol(EchoWebSocket) + return loop.create_server(proto_factory, host, port) + + s = loop.run_until_complete(start_server()) + logger = logging.getLogger('asyncio_testsuite') + logger.warning("Serving asyncio server on %s:%s" % s.sockets[0].getsockname()) + loop.run_forever() + + + +def run_tornado_server(host="127.0.0.1", port=9007): + """ + Runs a Tornado server on Python 2.x + """ + from tornado import ioloop, web, websocket + class EchoWebSocket(websocket.WebSocketHandler): + def on_message(self, message): + self.write_message(message) + + app = web.Application([(r"/", EchoWebSocket)]) + app.listen(port, address=host) + logger = logging.getLogger('autobahn_testsuite') + logger.warning("Serving Tornado server on %s:%s" % (host, port)) + ioloop.IOLoop.instance().start() + +def run_autobahn_server(host="127.0.0.1", port=9003): + """ + Runs a Autobahn server on Python 2.x + """ + from twisted.internet import reactor + from autobahn.twisted.websocket import WebSocketServerProtocol, \ + WebSocketServerFactory + + class MyServerProtocol(WebSocketServerProtocol): + def onMessage(self, payload, isBinary): + self.sendMessage(payload, isBinary) + + logger = logging.getLogger('autobahn_testsuite') + logger.warning("Serving Autobahn server on %s:%s" % (host, port)) + + factory = WebSocketServerFactory("ws://%s:%d" % (host, port)) + factory.protocol = MyServerProtocol + + reactor.listenTCP(port, factory) + reactor.run() + + +def run_python_wsgi(host="127.0.0.1", port=9002): + """ + Runs wsgi server on python 2.x" + """ + run_python_wsgi_async(host, port, False) + +def run_python_wsgi_async(host="127.0.0.1", port=9010, async=True): + """ + Runs wsgi server on python 2.x with async middleware" + """ + + from wsgiref.simple_server import make_server + from ws4py.websocket import EchoWebSocket + from ws4py.server.wsgirefserver import WSGIServer, WebSocketWSGIRequestHandler + from ws4py.server.wsgiutils import WebSocketWSGIApplication + + app = WebSocketWSGIApplication(handler_cls=EchoWebSocket) + if async: + def middleware(app): + def later(environ, start_response): + for part in app(environ, start_response): + yield part + return later + app = middleware(app) + server = make_server(host, port, server_class=WSGIServer, + handler_class=WebSocketWSGIRequestHandler, + app=app) + server.initialize_websockets_manager() + server.serve_forever() + +if __name__ == '__main__': + import argparse + from multiprocessing import Process + + logging.basicConfig(format='%(asctime)s %(message)s') + logger = logging.getLogger('autobahn_testsuite') + logger.setLevel(logging.WARNING) + + parser = argparse.ArgumentParser() + parser.add_argument('--run-all', dest='run_all', action='store_true', + help='Run all servers backend') + parser.add_argument('--run-cherrypy-server', dest='run_cherrypy', action='store_true', + help='Run the CherryPy server backend') + parser.add_argument('--run-cherrypy-server-wsaccel', dest='run_cherrypy_wsaccel', action='store_true', + help='Run the CherryPy server backend and wsaccel driver') + parser.add_argument('--run-cherrypy-server-pypy', dest='run_cherrypy_pypy', action='store_true', + help='Run the CherryPy server backend with PyPy') + parser.add_argument('--run-cherrypy-server-py3k', dest='run_cherrypy_py3k', action='store_true', + help='Run the CherryPy server backend with Python 3') + parser.add_argument('--run-gevent-server', dest='run_gevent', action='store_true', + help='Run the gevent server backend') + parser.add_argument('--run-tornado-server', dest='run_tornado', action='store_true', + help='Run the Tornado server backend') + parser.add_argument('--run-autobahn-server', dest='run_autobahn', action='store_true', + help='Run the Autobahn server backend') + parser.add_argument('--run-asyncio-server', dest='run_asyncio', action='store_true', + help='Run the asyncio server backend') + parser.add_argument('--run-wsgi-server', dest='run_wsgi', action='store_true', + help='Run the wsgi server backend') + parser.add_argument('--run-wsgi-async-server', dest='run_wsgi_async', action='store_true', + help='Run the wsgi server backend with an async middleware') + args = parser.parse_args() + + if args.run_all: + args.run_cherrypy = True + args.run_cherrypy_wsaccel = True + args.run_gevent = True + args.run_tornado = True + args.run_autobahn = True + args.run_asyncio = True + + procs = [] + logger.warning("CherryPy server: %s" % args.run_cherrypy) + if args.run_cherrypy: + p0 = Process(target=run_cherrypy_server) + p0.daemon = True + procs.append(p0) + + logger.warning("Gevent server: %s" % args.run_gevent) + if args.run_gevent: + p1 = Process(target=run_gevent_server) + p1.daemon = True + procs.append(p1) + + logger.warning("Tornado server: %s" % args.run_tornado) + if args.run_tornado: + p2 = Process(target=run_tornado_server) + p2.daemon = True + procs.append(p2) + + logger.warning("Autobahn server: %s" % args.run_autobahn) + if args.run_autobahn: + p3 = Process(target=run_autobahn_server) + p3.daemon = True + procs.append(p3) + + logger.warning("CherryPy server on PyPy: %s" % args.run_cherrypy_pypy) + if args.run_cherrypy_pypy: + p4 = Process(target=run_cherrypy_server_with_pypy) + p4.daemon = True + procs.append(p4) + + logger.warning("CherryPy server on Python 3: %s" % args.run_cherrypy_py3k) + if args.run_cherrypy_py3k: + p5 = Process(target=run_cherrypy_server_with_python3) + p5.daemon = True + procs.append(p5) + + logger.warning("CherryPy server on Python 2/wsaccel: %s" % args.run_cherrypy_wsaccel) + if args.run_cherrypy_wsaccel: + p6 = Process(target=run_cherrypy_server_with_wsaccel) + p6.daemon = True + procs.append(p6) + + logger.warning("asyncio server on Python 3: %s" % args.run_asyncio) + if args.run_asyncio: + p7 = Process(target=run_python3_asyncio) + p7.daemon = True + procs.append(p7) + + logger.warning("wsgi server: %s" % args.run_wsgi) + if args.run_wsgi: + p8 = Process(target=run_python_wsgi) + p8.daemon = True + procs.append(p8) + + logger.warning("wsgi server async: %s" % args.run_wsgi_async) + if args.run_wsgi_async: + p9 = Process(target=run_python_wsgi_async) + p9.daemon = True + procs.append(p9) + + for p in procs: + p.start() + logging.info("Starting process... %d" % p.pid) + + for p in procs: + p.join() + diff --git a/JUNK/WebSocket-for-Python-master/test/fuzzingclient.json b/JUNK/WebSocket-for-Python-master/test/fuzzingclient.json new file mode 100644 index 0000000..3c57f21 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/test/fuzzingclient.json @@ -0,0 +1,52 @@ +{ + "options": {"failByDrop": false}, + "outdir": "./reports/servers", + + "servers": [ + + {"agent": "ws4py (CherryPy 5.5.0) for Python 2.7.6", + "url": "ws://127.0.0.1:9008/", + "options": {"version": 18}}, + + {"agent": "ws4py (CherryPy 5.5.0)/wsaccel for Python 2.7.6", + "url": "ws://127.0.0.1:9006/", + "options": {"version": 18}}, + + {"agent": "ws4py (CherryPy 5.5.0)/wsaccel for Python 3.5.0", + "url": "ws://127.0.0.1:9004/", + "options": {"version": 18}}, + + {"agent": "ws4py (CherryPy 5.5.0) for PyPy 5.1", + "url": "ws://127.0.0.1:9005/", + "options": {"version": 18}}, + + {"agent": "ws4py (gevent 1.1.1)/wsaccel for Python 3.5.0", + "url": "ws://127.0.0.1:9001/", + "options": {"version": 18}}, + + {"agent": "Tornado 4.3 for Python 3.5.0", + "url": "ws://127.0.0.1:9007/", + "options": {"version": 18}}, + + {"agent": "Autobahn 0.10.9 for Python 3.5.0", + "url": "ws://127.0.0.1:9003/", + "options": {"version": 18}}, + + {"agent": "ws4py (asyncio)/wsaccel for Python 3.5.0", + "url": "ws://127.0.0.1:9009/", + "options": {"version": 18}}, + + {"agent": "ws4py (wsgi) for Python 2.7", + "url": "ws://127.0.0.1:9002/", + "options": {"version": 18}}, + + {"agent": "ws4py (wsgi async) for Python 2.7", + "url": "ws://127.0.0.1:9010/", + "options": {"version": 18}} + + ], + + "cases": ["*"], + "exclude-cases": ["6.4.3", "6.4.4", "12.*", "13.*"], + "exclude-agent-cases": {} +} diff --git a/JUNK/WebSocket-for-Python-master/test/test_cherrypy.py b/JUNK/WebSocket-for-Python-master/test/test_cherrypy.py new file mode 100644 index 0000000..4d184de --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/test/test_cherrypy.py @@ -0,0 +1,106 @@ +# -*- coding: utf-8 -*- +import os +import socket +import time +import unittest + +from mock import MagicMock, call + +import cherrypy +from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool +from ws4py.websocket import EchoWebSocket +from ws4py.framing import Frame, OPCODE_TEXT, OPCODE_CLOSE + +class FakePoller(object): + def __init__(self, timeout=0.1): + self._fds = [] + + def release(self): + self._fds = [] + + def register(self, fd): + if fd not in self._fds: + self._fds.append(fd) + + def unregister(self, fd): + if fd in self._fds: + self._fds.remove(fd) + + def poll(self): + return self._fds + +class App(object): + @cherrypy.expose + def ws(self): + assert cherrypy.request.ws_handler != None + +def setup_engine(): + # we don't need a HTTP server for this test + cherrypy.server.unsubscribe() + + cherrypy.config.update({'log.screen': False}) + + cherrypy.engine.websocket = WebSocketPlugin(cherrypy.engine) + cherrypy.engine.websocket.subscribe() + + cherrypy.engine.websocket.manager.poller = FakePoller() + + cherrypy.tools.websocket = WebSocketTool() + + config={'/ws': {'tools.websocket.on': True, + 'tools.websocket.handler_cls': EchoWebSocket}} + cherrypy.tree.mount(App(), '/', config) + cherrypy.engine.start() + +def teardown_engine(): + cherrypy.engine.exit() + +class CherryPyTest(unittest.TestCase): + def setUp(self): + setup_engine() + + def tearDown(self): + teardown_engine() + + def test_plugin(self): + manager = cherrypy.engine.websocket.manager + self.assertEqual(len(manager), 0) + + s = MagicMock(spec=socket.socket) + s.recv.return_value = Frame(opcode=OPCODE_TEXT, body=b'hello', + fin=1, masking_key=os.urandom(4)).build() + h = EchoWebSocket(s, [], []) + cherrypy.engine.publish('handle-websocket', h, ('127.0.0.1', 0)) + self.assertEqual(len(manager), 1) + self.assertTrue(h in manager) + + # the following call to .close() on the + # websocket object will initiate + # the closing handshake + # This next line mocks the response + # from the client to actually + # complete the handshake. + # The manager will then remove the websocket + # from its pool + s.recv.return_value = Frame(opcode=OPCODE_CLOSE, body=b"ok we're done", + fin=1, masking_key=os.urandom(4)).build() + h.close() + + # the poller runs a thread, give it time to get there + # just wait up to 5 seconds. + left_iteration = 50 + while left_iteration: + left_iteration -= 1 + time.sleep(.1) + if len(manager) == 0: + break + + self.assertEqual(len(manager), 0) + +if __name__ == '__main__': + suite = unittest.TestSuite() + loader = unittest.TestLoader() + for testcase in [CherryPyTest]: + tests = loader.loadTestsFromTestCase(testcase) + suite.addTests(tests) + unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/JUNK/WebSocket-for-Python-master/test/test_client.py b/JUNK/WebSocket-for-Python-master/test/test_client.py new file mode 100644 index 0000000..43e83a4 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/test/test_client.py @@ -0,0 +1,288 @@ +# -*- coding: utf-8 -*- +from base64 import b64encode +from hashlib import sha1 +import os +import socket +import time +import unittest + +from mock import MagicMock, call, patch + +from ws4py.manager import WebSocketManager +from ws4py.websocket import WebSocket +from ws4py import WS_KEY +from ws4py.exc import HandshakeError +from ws4py.framing import Frame, OPCODE_TEXT, OPCODE_CLOSE +from ws4py.messaging import CloseControlMessage +from ws4py.client import WebSocketBaseClient +from ws4py.client.threadedclient import WebSocketClient + +class BasicClientTest(unittest.TestCase): + def test_invalid_hostname_in_url(self): + self.assertRaises(ValueError, WebSocketBaseClient, url="qsdfqsd65qsd354") + + def test_invalid_scheme_in_url(self): + self.assertRaises(ValueError, WebSocketBaseClient, url="ftp://localhost") + + def test_invalid_hostname_in_url(self): + self.assertRaises(ValueError, WebSocketBaseClient, url="ftp://?/") + + def test_parse_unix_schemes(self): + c = WebSocketBaseClient(url="ws+unix:///my.socket") + self.assertEqual(c.scheme, "ws+unix") + self.assertEqual(c.host, "localhost") + self.assertIsNone(c.port) + self.assertEqual(c.unix_socket_path, "/my.socket") + self.assertEqual(c.resource, "/") + self.assertEqual(c.bind_addr, "/my.socket") + + c = WebSocketBaseClient(url="wss+unix:///my.socket") + self.assertEqual(c.scheme, "wss+unix") + self.assertEqual(c.host, "localhost") + self.assertIsNone(c.port) + self.assertEqual(c.unix_socket_path, "/my.socket") + self.assertEqual(c.resource, "/") + self.assertEqual(c.bind_addr, "/my.socket") + + def test_parse_ws_scheme(self): + c = WebSocketBaseClient(url="ws://127.0.0.1/") + self.assertEqual(c.scheme, "ws") + self.assertEqual(c.host, "127.0.0.1") + self.assertEqual(c.port, 80) + self.assertEqual(c.resource, "/") + self.assertEqual(c.bind_addr, ("127.0.0.1", 80)) + + def test_parse_ws_scheme_when_missing_resource(self): + c = WebSocketBaseClient(url="ws://127.0.0.1") + self.assertEqual(c.scheme, "ws") + self.assertEqual(c.host, "127.0.0.1") + self.assertEqual(c.port, 80) + self.assertEqual(c.resource, "/") + self.assertEqual(c.bind_addr, ("127.0.0.1", 80)) + + def test_parse_ws_scheme_with_port(self): + c = WebSocketBaseClient(url="ws://127.0.0.1:9090") + self.assertEqual(c.scheme, "ws") + self.assertEqual(c.host, "127.0.0.1") + self.assertEqual(c.port, 9090) + self.assertEqual(c.resource, "/") + self.assertEqual(c.bind_addr, ("127.0.0.1", 9090)) + + def test_parse_ws_scheme_with_query_string(self): + c = WebSocketBaseClient(url="ws://127.0.0.1/?token=value") + self.assertEqual(c.scheme, "ws") + self.assertEqual(c.host, "127.0.0.1") + self.assertEqual(c.port, 80) + self.assertEqual(c.resource, "/?token=value") + self.assertEqual(c.bind_addr, ("127.0.0.1", 80)) + + def test_parse_wss_scheme(self): + c = WebSocketBaseClient(url="wss://127.0.0.1/") + self.assertEqual(c.scheme, "wss") + self.assertEqual(c.host, "127.0.0.1") + self.assertEqual(c.port, 443) + self.assertEqual(c.resource, "/") + self.assertEqual(c.bind_addr, ("127.0.0.1", 443)) + + def test_parse_wss_scheme_when_missing_resource(self): + c = WebSocketBaseClient(url="wss://127.0.0.1") + self.assertEqual(c.scheme, "wss") + self.assertEqual(c.host, "127.0.0.1") + self.assertEqual(c.port, 443) + self.assertEqual(c.resource, "/") + self.assertEqual(c.bind_addr, ("127.0.0.1", 443)) + + def test_parse_wss_scheme_with_port(self): + c = WebSocketBaseClient(url="wss://127.0.0.1:9090") + self.assertEqual(c.scheme, "wss") + self.assertEqual(c.host, "127.0.0.1") + self.assertEqual(c.port, 9090) + self.assertEqual(c.resource, "/") + self.assertEqual(c.bind_addr, ("127.0.0.1", 9090)) + + def test_parse_wss_scheme_with_query_string(self): + c = WebSocketBaseClient(url="wss://127.0.0.1/?token=value") + self.assertEqual(c.scheme, "wss") + self.assertEqual(c.host, "127.0.0.1") + self.assertEqual(c.port, 443) + self.assertEqual(c.resource, "/?token=value") + self.assertEqual(c.bind_addr, ("127.0.0.1", 443)) + + @patch('ws4py.client.socket') + def test_connect_and_close(self, sock): + + s = MagicMock() + sock.socket.return_value = s + sock.getaddrinfo.return_value = [(socket.AF_INET, socket.SOCK_STREAM, 0, "", + ("127.0.0.1", 80, 0, 0))] + + c = WebSocketBaseClient(url="ws://127.0.0.1/?token=value") + + s.recv.return_value = b"\r\n".join([ + b"HTTP/1.1 101 Switching Protocols", + b"Connection: Upgrade", + b"Sec-Websocket-Version: 13", + b"Content-Type: text/plain;charset=utf-8", + b"Sec-Websocket-Accept: " + b64encode(sha1(c.key + WS_KEY).digest()), + b"Upgrade: websocket", + b"Date: Sun, 26 Jul 2015 12:32:55 GMT", + b"Server: ws4py/test", + b"\r\n" + ]) + + c.connect() + s.connect.assert_called_once_with(("127.0.0.1", 80)) + + s.reset_mock() + c.close(code=1006, reason="boom") + args = s.sendall.call_args_list[0] + f = Frame() + f.parser.send(args[0][0]) + f.parser.close() + self.assertIn(b'boom', f.unmask(f.body)) + + @patch('ws4py.client.socket') + def test_empty_response(self, sock): + + s = MagicMock() + sock.socket.return_value = s + sock.getaddrinfo.return_value = [(socket.AF_INET, socket.SOCK_STREAM, 0, "", + ("127.0.0.1", 80, 0, 0))] + + c = WebSocketBaseClient(url="ws://127.0.0.1/?token=value") + + s.recv.return_value = b"" + self.assertRaises(HandshakeError, c.connect) + s.shutdown.assert_called_once_with(socket.SHUT_RDWR) + s.close.assert_called_once_with() + + @patch('ws4py.client.socket') + def test_invdalid_response_code(self, sock): + + s = MagicMock() + sock.socket.return_value = s + sock.getaddrinfo.return_value = [(socket.AF_INET, socket.SOCK_STREAM, 0, "", + ("127.0.0.1", 80, 0, 0))] + + c = WebSocketBaseClient(url="ws://127.0.0.1/?token=value") + + s.recv.return_value = b"\r\n".join([ + b"HTTP/1.1 200 Switching Protocols", + b"Connection: Upgrade", + b"Sec-Websocket-Version: 13", + b"Content-Type: text/plain;charset=utf-8", + b"Sec-Websocket-Accept: " + b64encode(sha1(c.key + WS_KEY).digest()), + b"Upgrade: websocket", + b"Date: Sun, 26 Jul 2015 12:32:55 GMT", + b"Server: ws4py/test", + b"\r\n" + ]) + + self.assertRaises(HandshakeError, c.connect) + s.shutdown.assert_called_once_with(socket.SHUT_RDWR) + s.close.assert_called_once_with() + + @patch('ws4py.client.socket') + def test_invalid_response_headers(self, sock): + + for key_header, invalid_value in ((b'upgrade', b'boom'), + (b'connection', b'bim')): + s = MagicMock() + sock.socket.return_value = s + sock.getaddrinfo.return_value = [(socket.AF_INET, socket.SOCK_STREAM, 0, "", + ("127.0.0.1", 80, 0, 0))] + c = WebSocketBaseClient(url="ws://127.0.0.1/?token=value") + + status_line = b"HTTP/1.1 101 Switching Protocols" + headers = { + b"connection": b"Upgrade", + b"Sec-Websocket-Version": b"13", + b"Content-Type": b"text/plain;charset=utf-8", + b"Sec-Websocket-Accept": b64encode(sha1(c.key + WS_KEY).digest()), + b"upgrade": b"websocket", + b"Date": b"Sun, 26 Jul 2015 12:32:55 GMT", + b"Server": b"ws4py/test" + } + + headers[key_header] = invalid_value + + request = [status_line] + [k + b" : " + v for (k, v) in headers.items()] + [b'\r\n'] + s.recv.return_value = b"\r\n".join(request) + + self.assertRaises(HandshakeError, c.connect) + s.shutdown.assert_called_once_with(socket.SHUT_RDWR) + s.close.assert_called_once_with() + sock.reset_mock() + +class ThreadedClientTest(unittest.TestCase): + + @patch('ws4py.client.socket') + def setUp(self, sock): + self.sock = MagicMock(spec=socket.socket) + sock.socket.return_value = self.sock + sock.getaddrinfo.return_value = [(socket.AF_INET, socket.SOCK_STREAM, 0, "", + ("127.0.0.1", 80, 0, 0))] + + self.client = WebSocketClient(url="ws://127.0.0.1/") + + def _exchange1(self, *args, **kwargs): + yield b"\r\n".join([ + b"HTTP/1.1 101 Switching Protocols", + b"Connection: Upgrade", + b"Sec-Websocket-Version: 13", + b"Content-Type: text/plain;charset=utf-8", + b"Sec-Websocket-Accept: " + b64encode(sha1(self.client.key + WS_KEY).digest()), + b"Upgrade: websocket", + b"Date: Sun, 26 Jul 2015 12:32:55 GMT", + b"Server: ws4py/test", + b"\r\n" + ]) + + for i in range(100): + time.sleep(0.1) + yield Frame(opcode=OPCODE_TEXT, body=b'hello', + fin=1).build() + + def _exchange2(self, *args, **kwargs): + yield Frame(opcode=OPCODE_CLOSE, body=b'', + fin=1).build() + + def test_thread_is_started_once_connected(self): + self.sock.recv.side_effect = self._exchange1() + self.assertFalse(self.client._th.is_alive()) + + self.client.connect() + time.sleep(0.5) + self.assertTrue(self.client._th.is_alive()) + + self.sock.recv.side_effect = self._exchange2() + time.sleep(0.5) + self.assertFalse(self.client._th.is_alive()) + + def test_thread_is_started_once_connected_secure(self): + """ Same as the above test, but with SSL socket """ + # pretend the socket is an SSL socket + self.sock.pending = lambda: False + self.client._is_secure = True + + self.sock.recv.side_effect = self._exchange1() + self.assertFalse(self.client._th.is_alive()) + + self.client.connect() + time.sleep(0.5) + self.assertTrue(self.client._th.is_alive()) + + self.sock.recv.side_effect = self._exchange2() + time.sleep(0.5) + self.assertFalse(self.client._th.is_alive()) + + + +if __name__ == '__main__': + suite = unittest.TestSuite() + loader = unittest.TestLoader() + for testcase in [BasicClientTest, + ThreadedClientTest]: + tests = loader.loadTestsFromTestCase(testcase) + suite.addTests(tests) + unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/JUNK/WebSocket-for-Python-master/test/test_frame.py b/JUNK/WebSocket-for-Python-master/test/test_frame.py new file mode 100644 index 0000000..b5b5dd3 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/test/test_frame.py @@ -0,0 +1,307 @@ +# -*- coding: utf-8 -*- +import os +import unittest +import types +import random +from struct import pack, unpack + +from ws4py.framing import Frame, \ + OPCODE_CONTINUATION, OPCODE_TEXT, \ + OPCODE_BINARY, OPCODE_CLOSE, OPCODE_PING, OPCODE_PONG +from ws4py.exc import FrameTooLargeException, ProtocolException +from ws4py.compat import * + +def map_on_bytes(f, bytes): + for index, byte in enumerate(bytes): + f(bytes[index:index+1]) + +class WSFrameBuilderTest(unittest.TestCase): + def test_7_bit_length(self): + f = Frame(opcode=OPCODE_TEXT, + body=b'', fin=1) + self.assertEqual(len(f.build()), 2) + + f = Frame(opcode=OPCODE_TEXT, + body=b'*' * 125, fin=1) + self.assertEqual(len(f.build()), 127) + + mask = os.urandom(4) + f = Frame(opcode=OPCODE_TEXT, + body=b'', masking_key=mask, fin=1) + self.assertEqual(len(f.build()), 6) + + f = Frame(opcode=OPCODE_TEXT, + body=b'*' * 125, masking_key=mask, fin=1) + self.assertEqual(len(f.build()), 131) + + def test_16_bit_length(self): + f = Frame(opcode=OPCODE_TEXT, + body=b'*' * 126, fin=1) + self.assertEqual(len(f.build()), 130) + + f = Frame(opcode=OPCODE_TEXT, + body=b'*' * 65535, fin=1) + self.assertEqual(len(f.build()), 65539) + + mask = os.urandom(4) + f = Frame(opcode=OPCODE_TEXT, + body=b'*' * 126, masking_key=mask, fin=1) + self.assertEqual(len(f.build()), 134) + + f = Frame(opcode=OPCODE_TEXT, + body=b'*' * 65535, masking_key=mask, fin=1) + self.assertEqual(len(f.build()), 65543) + + def test_63_bit_length(self): + f = Frame(opcode=OPCODE_TEXT, + body=b'*' * 65536, fin=1) + self.assertEqual(len(f.build()), 65546) + + mask = os.urandom(4) + f = Frame(opcode=OPCODE_TEXT, + body=b'*' * 65536, masking_key=mask, fin=1) + self.assertEqual(len(f.build()), 65550) + + def test_non_zero_nor_one_fin(self): + f = Frame(opcode=OPCODE_TEXT, + body=b'', fin=2) + self.assertRaises(ValueError, f.build) + + def test_opcodes(self): + for opcode in [OPCODE_CONTINUATION, OPCODE_TEXT, + OPCODE_BINARY, OPCODE_CLOSE, + OPCODE_PING, OPCODE_PONG]: + f = Frame(opcode=opcode, body=b'', fin=1) + byte = ord(f.build()[0]) + self.assertTrue(byte & opcode == opcode) + + f = Frame(opcode=0x3, body=b'', fin=1) + self.assertRaises(ValueError, f.build) + + def test_masking(self): + if py3k: mask = b"7\xfa!=" + else: mask = "7\xfa!=" + f = Frame(opcode=OPCODE_TEXT, + body=b'Hello', + masking_key=mask, fin=1) + + if py3k: spec_says = b'\x81\x857\xfa!=\x7f\x9fMQX' + else: spec_says = '\x81\x857\xfa!=\x7f\x9fMQX' + self.assertEqual(f.build(), spec_says) + + def test_frame_too_large(self): + f = Frame(opcode=OPCODE_TEXT, body=b'', fin=1) + # fake huge length + f.payload_length = 1 << 63 + self.assertRaises(FrameTooLargeException, f.build) + + def test_passing_encoded_string(self): + # once encoded the u'\xe9' character will be of length 2 + f = Frame(opcode=OPCODE_TEXT, body=u'\xe9trange'.encode('utf-8'), fin=1) + self.assertEqual(len(f.build()), 10) + + def test_passing_unencoded_string_raises_type_error(self): + self.assertRaises(TypeError, Frame, opcode=OPCODE_TEXT, body=u'\xe9', fin=1) + +class WSFrameParserTest(unittest.TestCase): + def test_frame_parser_is_a_generator(self): + f = Frame() + self.assertEqual(type(f.parser), types.GeneratorType) + f.parser.close() + self.assertRaises(StopIteration, next, f.parser) + + def test_frame_header_parsing(self): + bytes = Frame(opcode=OPCODE_TEXT, body=b'hello', fin=1).build() + + f = Frame() + self.assertEqual(f.parser.send(bytes[0:1]), 1) + self.assertEqual(f.fin, 1) + self.assertEqual(f.rsv1, 0) + self.assertEqual(f.rsv2, 0) + self.assertEqual(f.rsv3, 0) + self.assertEqual(f.parser.send(bytes[1:2]), 5) + self.assertTrue(f.masking_key is None) + self.assertEqual(f.payload_length, 5) + f.parser.close() + + def test_frame_payload_parsing(self): + bytes = Frame(opcode=OPCODE_TEXT, body=b'hello', fin=1).build() + + f = Frame() + self.assertEqual(f.parser.send(bytes[0:1]), 1) + self.assertEqual(f.parser.send(bytes[1:2]), 5) + f.parser.send(bytes[2:]) + self.assertEqual(f.body, b'hello') + + f = Frame() + f.parser.send(bytes) + self.assertRaises(StopIteration, next, f.parser) + self.assertEqual(f.body, b'hello') + + def test_incremental_parsing_small_7_bit_length(self): + bytes = Frame(opcode=OPCODE_TEXT, body=b'hello', fin=1).build() + + f = Frame() + map_on_bytes(f.parser.send, bytes) + self.assertTrue(f.masking_key is None) + self.assertEqual(f.payload_length, 5) + + def test_incremental_parsing_16_bit_length(self): + bytes = Frame(opcode=OPCODE_TEXT, body=b'*' * 126, fin=1).build() + + f = Frame() + map_on_bytes(f.parser.send, bytes) + self.assertTrue(f.masking_key is None) + self.assertEqual(f.payload_length, 126) + + def test_incremental_parsing_63_bit_length(self): + bytes = Frame(opcode=OPCODE_TEXT, body=b'*' * 65536, fin=1).build() + + f = Frame() + map_on_bytes(f.parser.send, bytes) + self.assertTrue(f.masking_key is None) + self.assertEqual(f.payload_length, 65536) + + def test_rsv1_bits_set(self): + f = Frame() + self.assertRaises(ProtocolException, f.parser.send, b'\x40') + + def test_rsv2_bits_set(self): + f = Frame() + self.assertRaises(ProtocolException, f.parser.send, b'\x20') + + def test_rsv3_bits_set(self): + f = Frame() + self.assertRaises(ProtocolException, f.parser.send, b'\x10') + + def test_invalid_opcode(self): + for opcode in range(3, 9): + f = Frame() + self.assertRaises(ProtocolException, f.parser.send, chr(opcode)) + + f = Frame() + self.assertRaises(ProtocolException, f.parser.send, chr(10)) + + def test_fragmented_control_frame_is_invalid(self): + f = Frame() + self.assertRaises(ProtocolException, f.parser.send, b'0x9') + + def test_fragmented_control_frame_is_too_large(self): + bytes = Frame(opcode=OPCODE_PING, body=b'*'*65536, fin=1).build() + f = Frame() + self.assertRaises(FrameTooLargeException, f.parser.send, bytes) + + def test_frame_sized_127(self): + body = b'*'*65536 + bytes = Frame(opcode=OPCODE_TEXT, body=body, fin=1).build() + + f = Frame() + # determine how the size is stored + f.parser.send(bytes[:3]) + self.assertTrue(f.masking_key is None) + # that's a large frame indeed + self.assertEqual(f.payload_length, 127) + + # this will compute the actual application data size + # it will also read the first byte of data + # indeed the length is found from byte 3 to 10 + f.parser.send(bytes[3:11]) + self.assertEqual(f.payload_length, 65536) + + # parse the rest of our data + f.parser.send(bytes[11:]) + self.assertEqual(f.body, body) + + + # The same but this time we provide enough + # bytes so that the application's data length + # can be computed from the first generator's send call + f = Frame() + f.parser.send(bytes[:10]) + self.assertTrue(f.masking_key is None) + self.assertEqual(f.payload_length, 65536) + + # parse the rest of our data + f.parser.send(bytes[10:]) + self.assertEqual(f.body, body) + + + # The same with masking given out gradually + mask = os.urandom(4) + bytes = Frame(opcode=OPCODE_TEXT, body=body, fin=1, masking_key=mask).build() + f = Frame() + f.parser.send(bytes[:10]) + self.assertTrue(f.masking_key is None) + self.assertEqual(f.payload_length, 65536) + + # parse the mask gradually + f.parser.send(bytes[10:12]) + f.parser.send(bytes[12:]) + self.assertEqual(f.unmask(f.body), body) + + def test_frame_too_large_with_7_bit_length(self): + header = pack('!B', ((1 << 7) + | (0 << 6) + | (0 << 5) + | (0 << 4) + | OPCODE_TEXT)) + header += pack('!B', 127) + pack('!Q', 1 << 63) + b = bytes(header + b'') + f = Frame() + self.assertRaises(FrameTooLargeException, f.parser.send, b) + + def test_not_sensitive_to_overflow(self): + header = pack('!B', ((1 << 7) + | (0 << 6) + | (0 << 5) + | (0 << 4) + | OPCODE_TEXT)) + header += pack('!B', 126) + pack('!H', 256) + b = bytes(header + b'*' * 512) + f = Frame() + f.parser.send(b) + # even though we tried to inject 512 bytes, we + # still only read 256 + self.assertEqual(len(f.body), 256) + + def test_frame_sized_126(self): + body = b'*'*256 + bytes = Frame(opcode=OPCODE_TEXT, body=body, fin=1).build() + + f = Frame() + # determine how the size is stored + f.parser.send(bytes[:3]) + self.assertTrue(f.masking_key is None) + # that's a large frame indeed + self.assertEqual(f.payload_length, 126) + + # this will compute the actual application data size + # it will also read the first byte of data + # indeed the length is found from byte 3 to 10 + f.parser.send(bytes[3:11]) + self.assertEqual(f.payload_length, 256) + + # parse the rest of our data + f.parser.send(bytes[11:]) + self.assertEqual(f.body, body) + + + # The same but this time we provide enough + # bytes so that the application's data length + # can be computed from the first generator's send call + f = Frame() + f.parser.send(bytes[:10]) + self.assertTrue(f.masking_key is None) + self.assertEqual(f.payload_length, 256) + + # parse the rest of our data + f.parser.send(bytes[10:]) + self.assertEqual(f.body, body) + +if __name__ == '__main__': + suite = unittest.TestSuite() + loader = unittest.TestLoader() + for testcase in (WSFrameBuilderTest, WSFrameParserTest,): + tests = loader.loadTestsFromTestCase(testcase) + suite.addTests(tests) + unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/JUNK/WebSocket-for-Python-master/test/test_logger.py b/JUNK/WebSocket-for-Python-master/test/test_logger.py new file mode 100644 index 0000000..a39e56d --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/test/test_logger.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +import logging +import logging.handlers as handlers +import os, os.path +import unittest +import sys + +from ws4py import configure_logger + +def clean_logger(): + logger = logging.getLogger('ws4py') + for handler in list(logger.handlers): + try: + handler.close() + except KeyError: + pass + logger.removeHandler(handler) + +class WSTestLogger(unittest.TestCase): + def tearDown(self): + clean_logger() + + def test_named_logger(self): + logger = configure_logger(stdout=False, filepath='./my.log') + + logger = logging.getLogger('ws4py') + self.assertEqual(logger.getEffectiveLevel(), logging.INFO) + + def test_level(self): + logger = configure_logger(stdout=True, filepath='./my.log', + level=logging.DEBUG) + + self.assertEqual(logger.getEffectiveLevel(), logging.DEBUG) + for handler in logger.handlers: + self.assertEqual(handler.level, logging.DEBUG) + + def test_file_logger(self): + filepath = os.path.abspath('./my.log') + logger = configure_logger(stdout=False, filepath=filepath) + for handler in logger.handlers: + if isinstance(handler, handlers.RotatingFileHandler): + self.assertEqual(handler.baseFilename, filepath) + self.assertEqual(handler.stream.name, filepath) + break + else: + self.fail("File logger not configured") + + def test_stdout_logger(self): + logger = configure_logger() + for handler in logger.handlers: + if isinstance(handler, logging.StreamHandler) and not\ + isinstance(handler, handlers.RotatingFileHandler): + self.assertTrue(handler.stream is sys.stdout) + break + else: + self.fail("Stream logger not configured") + +if __name__ == '__main__': + suite = unittest.TestSuite() + loader = unittest.TestLoader() + for testcase in [WSTestLogger]: + tests = loader.loadTestsFromTestCase(testcase) + suite.addTests(tests) + unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/JUNK/WebSocket-for-Python-master/test/test_manager.py b/JUNK/WebSocket-for-Python-master/test/test_manager.py new file mode 100644 index 0000000..126c714 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/test/test_manager.py @@ -0,0 +1,286 @@ +# -*- coding: utf-8 -*- +import time +import itertools +import unittest + +try: + from itertools import izip_longest as zip_longest +except ImportError: + from itertools import zip_longest + +from mock import MagicMock, call, patch + +from ws4py.manager import WebSocketManager, SelectPoller,\ + EPollPoller +from ws4py.websocket import WebSocket + +class WSManagerTest(unittest.TestCase): + @patch('ws4py.manager.SelectPoller') + def test_add_and_remove_websocket(self, MockSelectPoller): + m = WebSocketManager(poller=MockSelectPoller()) + + ws = MagicMock() + ws.sock.fileno.return_value = 1 + + m.add(ws) + m.poller.register.assert_called_once_with(1) + + m.remove(ws) + m.poller.unregister.assert_called_once_with(1) + + @patch('ws4py.manager.SelectPoller') + def test_cannot_add_websocket_more_than_once(self, MockSelectPoller): + m = WebSocketManager(poller=MockSelectPoller()) + + ws = MagicMock() + ws.sock.fileno.return_value = 1 + + m.add(ws) + self.assertEqual(len(m), 1) + + m.add(ws) + self.assertEqual(len(m), 1) + + @patch('ws4py.manager.SelectPoller') + def test_cannot_remove_unregistered_websocket(self, MockSelectPoller): + m = WebSocketManager(poller=MockSelectPoller()) + + ws = MagicMock() + ws.sock.fileno.return_value = 1 + + m.remove(ws) + self.assertEqual(len(m), 0) + self.assertFalse(m.poller.unregister.called) + + m.add(ws) + self.assertEqual(len(m), 1) + m.remove(ws) + self.assertEqual(len(m), 0) + m.poller.unregister.assert_called_once_with(1) + m.poller.reset_mock() + + m.remove(ws) + self.assertEqual(len(m), 0) + self.assertFalse(m.poller.unregister.called) + + @patch('ws4py.manager.SelectPoller') + def test_mainloop_can_be_stopped_when_no_websocket_were_registered(self, MockSelectPoller): + m = WebSocketManager(poller=MockSelectPoller()) + self.assertFalse(m.running) + + m.start() + self.assertTrue(m.running) + + m.stop() + self.assertFalse(m.running) + + @patch('ws4py.manager.SelectPoller') + def test_mainloop_can_be_stopped(self, MockSelectPoller): + m = WebSocketManager(poller=MockSelectPoller()) + + def poll(): + yield 1 + m.stop() + yield 2 + + m.poller.poll.return_value = poll() + self.assertFalse(m.running) + + m.start() + # just make sure it had the time to finish + time.sleep(0.1) + self.assertFalse(m.running) + + @patch('ws4py.manager.SelectPoller') + def test_websocket_terminated_from_mainloop(self, MockSelectPoller): + m = WebSocketManager(poller=MockSelectPoller()) + m.poller.poll.return_value = [1] + + ws = MagicMock() + + ws.terminated = False + ws.sock.fileno.return_value = 1 + ws.once.return_value = False + + m.add(ws) + m.start() + time.sleep(0.2) + + ws.terminate.assert_called_once_with() + + m.stop() + + @patch('ws4py.manager.SelectPoller') + def test_websocket_close_all(self, MockSelectPoller): + m = WebSocketManager(poller=MockSelectPoller()) + + ws = MagicMock() + m.add(ws) + m.close_all() + ws.close.assert_called_once_with(code=1001, reason='Server is shutting down') + + @patch('ws4py.manager.SelectPoller') + def test_broadcast(self, MockSelectPoller): + m = WebSocketManager(poller=MockSelectPoller()) + + ws = MagicMock() + ws.terminated = False + m.add(ws) + + m.broadcast(b'hello there') + ws.send.assert_called_once_with(b'hello there', False) + + @patch('ws4py.manager.SelectPoller') + def test_broadcast_failure_must_not_break_caller(self, MockSelectPoller): + m = WebSocketManager(poller=MockSelectPoller()) + + ws = MagicMock() + ws.terminated = False + ws.send.side_effect = RuntimeError + m.add(ws) + + try: + m.broadcast(b'hello there') + except: + self.fail("Broadcasting shouldn't have failed") + +class WSSelectPollerTest(unittest.TestCase): + @patch('ws4py.manager.select') + def test_release_poller(self, select): + poller = SelectPoller() + select.select.return_value = (poller._fds, None, None) + + poller.register(0) + poller.register(1) + fd = poller.poll() + self.assertEqual(fd, [0, 1]) + + poller.unregister(0) + fd = poller.poll() + self.assertEqual(fd, [1]) + + poller.release() + fd = poller.poll() + self.assertEqual(fd, []) + + def test_timeout_when_no_registered_fds(self): + poller = SelectPoller(timeout=0.5) + a = time.time() + fd = poller.poll() + b = time.time() + self.assertEqual(fd, []) + + d = b - a + if not (0.48 < d < 0.52): + self.fail("Did not wait for the appropriate amount of time: %f" % d) + + @patch('ws4py.manager.select') + def test_register_twice_does_not_duplicate_fd(self, select): + poller = SelectPoller() + select.select.return_value = (poller._fds, None, None) + poller.register(0) + poller.register(0) + fd = poller.poll() + self.assertEqual(fd, [0]) + + def test_unregister_twice_has_no_side_effect(self): + poller = SelectPoller() + poller.register(0) + poller.unregister(0) + try: + poller.unregister(0) + except Exception as ex: + self.fail("Shouldn't have failed: %s" % ex) + + +class FakeEpoll(object): + def __init__(self): + self.fds = [] + + def close(self): + self.fds = [] + + def register(self, fd, mask): + if fd in self.fds: + raise IOError("Already registered") + + self.fds.append(fd) + + def unregister(self, fd): + # epoll's documentation doesn't say anything + # about removing fds that are not registered + # yet/any longer + if fd in self.fds: + self.fds.remove(fd) + + def poll(self, timeout): + # this isn't really what's happening + # inside but we're not testing + # epoll afterall + if not self.fds: + time.sleep(timeout) + return [] + + # fake EPOLLIN + return zip_longest(self.fds, '', fillvalue=1) + +class WSEPollPollerTest(unittest.TestCase): + @patch('ws4py.manager.select') + def test_release_poller(self, select): + select.epoll.return_value = FakeEpoll() + poller = EPollPoller() + + poller.register(0) + poller.register(1) + fd = poller.poll() + self.assertEqual(list(fd), [0, 1]) + + poller.unregister(0) + fd = poller.poll() + self.assertEqual(list(fd), [1]) + + poller.release() + fd = poller.poll() + self.assertEqual(list(fd), []) + + @patch('ws4py.manager.select') + def test_timeout_when_no_registered_fds(self, select): + select.epoll.return_value = FakeEpoll() + poller = EPollPoller(timeout=0.5) + + a = time.time() + fd = list(poller.poll()) + b = time.time() + self.assertEqual(fd, []) + + d = b - a + if not (0.48 < d < 0.52): + self.fail("Did not wait for the appropriate amount of time: %f" % d) + + @patch('ws4py.manager.select') + def test_register_twice_does_not_duplicate_fd(self, select): + select.epoll.return_value = FakeEpoll() + poller = EPollPoller() + poller.register(0) + poller.register(0) # IOError is swallowed + fd = poller.poll() + self.assertEqual(list(fd), [0]) + + @patch('ws4py.manager.select') + def test_unregister_twice_has_no_side_effect(self, select): + select.epoll.return_value = FakeEpoll() + poller = EPollPoller() + poller.register(0) + poller.unregister(0) + try: + poller.unregister(0) + except Exception as ex: + self.fail("Shouldn't have failed: %s" % ex) + +if __name__ == '__main__': + suite = unittest.TestSuite() + loader = unittest.TestLoader() + for testcase in [WSManagerTest, WSSelectPollerTest]: + tests = loader.loadTestsFromTestCase(testcase) + suite.addTests(tests) + unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/JUNK/WebSocket-for-Python-master/test/test_messaging.py b/JUNK/WebSocket-for-Python-master/test/test_messaging.py new file mode 100644 index 0000000..f37a297 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/test/test_messaging.py @@ -0,0 +1,128 @@ +# -*- coding: utf-8 -*- +import os +import unittest + +from ws4py.framing import Frame, \ + OPCODE_CONTINUATION, OPCODE_TEXT, \ + OPCODE_BINARY, OPCODE_CLOSE, OPCODE_PING, OPCODE_PONG +from ws4py.messaging import * +from ws4py.compat import * + +class WSMessagingTest(unittest.TestCase): + def test_bytearray_text_message(self): + m = TextMessage(bytearray(u'\xe9trange', 'utf-8')) + self.assertFalse(m.is_binary) + self.assertTrue(m.is_text) + self.assertEqual(m.opcode, OPCODE_TEXT) + self.assertEqual(m.encoding, 'utf-8') + self.assertIsInstance(m.data, bytes) + # length is compted on the unicode representation + self.assertEqual(len(m), 7) + # but once encoded it's actually taking 8 bytes in UTF-8 + self.assertEqual(len(m.data), 8) + self.assertEqual(m.data, u'\xe9trange'.encode('utf-8')) + + f = m.single() + self.assertIsInstance(f, bytes) + self.assertEqual(len(f), 10) # no masking + + f = m.single(mask=True) + self.assertIsInstance(f, bytes) + self.assertEqual(len(f), 14) # mask takes 4 bytes + + self.assertEqual(m.fragment(first=True, last=True), m.single()) + + m.extend(bytearray(' oui', 'utf-8')) + self.assertEqual(m.data, u'\xe9trange oui'.encode('utf-8')) + + def test_bytes_text_message(self): + m = TextMessage(u'\xe9trange'.encode('utf-8')) + self.assertEqual(m.opcode, OPCODE_TEXT) + self.assertEqual(m.encoding, 'utf-8') + self.assertIsInstance(m.data, bytes) + self.assertFalse(m.is_binary) + self.assertTrue(m.is_text) + # length is compted on the unicode representation + self.assertEqual(len(m), 7) + # but once encoded it's actually taking 8 bytes in UTF-8 + self.assertEqual(len(m.data), 8) + self.assertEqual(m.data, u'\xe9trange'.encode('utf-8')) + + f = m.single() + self.assertIsInstance(f, bytes) + self.assertEqual(len(f), 10) # no masking + + f = m.single(mask=True) + self.assertIsInstance(f, bytes) + self.assertEqual(len(f), 14) # mask takes 4 bytes + + self.assertEqual(m.fragment(first=True, last=True), m.single()) + + m.extend(b' oui') + self.assertEqual(m.data, u'\xe9trange oui'.encode('utf-8')) + + def test_unicode_text_message(self): + m = TextMessage(u'\xe9trange') + self.assertEqual(m.opcode, OPCODE_TEXT) + self.assertEqual(m.encoding, 'utf-8') + self.assertIsInstance(m.data, bytes) + self.assertFalse(m.is_binary) + self.assertTrue(m.is_text) + # length is compted on the unicode representation + self.assertEqual(len(m), 7) + # but once encoded it's actually taking 8 bytes in UTF-8 + self.assertEqual(len(m.data), 8) + self.assertEqual(m.data, u'\xe9trange'.encode('utf-8')) + + f = m.single() + self.assertIsInstance(f, bytes) + self.assertEqual(len(f), 10) # no masking + + f = m.single(mask=True) + self.assertIsInstance(f, bytes) + self.assertEqual(len(f), 14) # mask takes 4 bytes + + self.assertEqual(m.fragment(first=True, last=True), m.single()) + + m.extend(u' oui') + self.assertEqual(m.data, u'\xe9trange oui'.encode('utf-8')) + + def test_unicode_text_message_with_no_encoding(self): + self.assertRaises(TypeError, Message, OPCODE_TEXT, u'\xe9trange', encoding=None) + + def test_invalid_text_message_data_type(self): + self.assertRaises(TypeError, TextMessage, ['something else']) + m = TextMessage(u'\xe9trange') + self.assertRaises(TypeError, m.extend, ["list aren't supported types"]) + + def test_close_control_message(self): + m = CloseControlMessage(reason=u'bye bye') + self.assertEqual(m.opcode, OPCODE_CLOSE) + self.assertEqual(m.encoding, 'utf-8') + self.assertIsInstance(m.reason, bytes) + self.assertEqual(len(m), 7) + self.assertEqual(m.code, 1000) + self.assertEqual(m.reason, b'bye bye') + + def test_ping_control_message(self): + m = PingControlMessage(data=u'are you there?') + self.assertEqual(m.opcode, OPCODE_PING) + self.assertEqual(m.encoding, 'utf-8') + self.assertIsInstance(m.data, bytes) + self.assertEqual(len(m), 14) + + def test_pong_control_message(self): + m = PongControlMessage(data=u'yes, I am') + self.assertEqual(m.opcode, OPCODE_PONG) + self.assertEqual(m.encoding, 'utf-8') + self.assertIsInstance(m.data, bytes) + self.assertEqual(len(m), 9) + + +if __name__ == '__main__': + suite = unittest.TestSuite() + loader = unittest.TestLoader() + for testcase in [WSMessagingTest]: + tests = loader.loadTestsFromTestCase(testcase) + suite.addTests(tests) + unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/JUNK/WebSocket-for-Python-master/test/test_stream.py b/JUNK/WebSocket-for-Python-master/test/test_stream.py new file mode 100644 index 0000000..28c79d9 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/test/test_stream.py @@ -0,0 +1,410 @@ +# -*- coding: utf-8 -*- +import unittest +import os +import struct + +from ws4py.framing import Frame, \ + OPCODE_CONTINUATION, OPCODE_TEXT, \ + OPCODE_BINARY, OPCODE_CLOSE, OPCODE_PING, OPCODE_PONG +from ws4py.streaming import Stream +from ws4py.messaging import TextMessage, BinaryMessage, \ + CloseControlMessage, PingControlMessage, PongControlMessage +from ws4py.compat import * + +class WSStreamTest(unittest.TestCase): + def test_empty_close_message(self): + f = Frame(opcode=OPCODE_CLOSE, body=b'', fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(s.closing, None) + s.parser.send(f) + self.assertEqual(type(s.closing), CloseControlMessage) + self.assertEqual(s.closing.code, 1005) + + def test_missing_masking_key_when_expected(self): + f = Frame(opcode=OPCODE_TEXT, body=b'hello', fin=1, masking_key=None).build() + s = Stream(expect_masking=True) + s.parser.send(f) + next(s.parser) + self.assertNotEqual(s.errors, []) + self.assertIsInstance(s.errors[0], CloseControlMessage) + self.assertEqual(s.errors[0].code, 1002) + + def test_using_masking_key_when_unexpected(self): + f = Frame(opcode=OPCODE_TEXT, body=b'hello', fin=1, masking_key=os.urandom(4)).build() + s = Stream(expect_masking=False) + s.parser.send(f) + next(s.parser) + self.assertNotEqual(s.errors, []) + self.assertIsInstance(s.errors[0], CloseControlMessage) + self.assertEqual(s.errors[0].code, 1002) + + def test_text_messages_cannot_interleave(self): + s = Stream() + + f = Frame(opcode=OPCODE_TEXT, body=b'hello', + fin=0, masking_key=os.urandom(4)).build() + s.parser.send(f) + next(s.parser) + + f = Frame(opcode=OPCODE_TEXT, body=b'there', + fin=1, masking_key=os.urandom(4)).build() + s.parser.send(f) + next(s.parser) + + self.assertNotEqual(s.errors, []) + self.assertIsInstance(s.errors[0], CloseControlMessage) + self.assertEqual(s.errors[0].code, 1002) + + def test_binary_messages_cannot_interleave(self): + s = Stream() + + f = Frame(opcode=OPCODE_BINARY, body=os.urandom(2), + fin=0, masking_key=os.urandom(4)).build() + s.parser.send(f) + next(s.parser) + + f = Frame(opcode=OPCODE_BINARY, body=os.urandom(7), + fin=1, masking_key=os.urandom(4)).build() + s.parser.send(f) + next(s.parser) + + self.assertNotEqual(s.errors, []) + self.assertIsInstance(s.errors[0], CloseControlMessage) + self.assertEqual(s.errors[0].code, 1002) + + def test_binary_and_text_messages_cannot_interleave(self): + s = Stream() + + f = Frame(opcode=OPCODE_TEXT, body=b'hello', + fin=0, masking_key=os.urandom(4)).build() + s.parser.send(f) + next(s.parser) + + f = Frame(opcode=OPCODE_BINARY, body=os.urandom(7), + fin=1, masking_key=os.urandom(4)).build() + s.parser.send(f) + next(s.parser) + + self.assertNotEqual(s.errors, []) + self.assertIsInstance(s.errors[0], CloseControlMessage) + self.assertEqual(s.errors[0].code, 1002) + + def test_continuation_frame_before_message_started_is_invalid(self): + f = Frame(opcode=OPCODE_CONTINUATION, body=b'hello', + fin=1, masking_key=os.urandom(4)).build() + s = Stream() + s.parser.send(f) + next(s.parser) + self.assertNotEqual(s.errors, []) + self.assertIsInstance(s.errors[0], CloseControlMessage) + self.assertEqual(s.errors[0].code, 1002) + + def test_invalid_encoded_bytes(self): + f = Frame(opcode=OPCODE_TEXT, body=b'h\xc3llo', + fin=1, masking_key=os.urandom(4)).build() + s = Stream() + s.parser.send(f) + next(s.parser) + self.assertNotEqual(s.errors, []) + self.assertIsInstance(s.errors[0], CloseControlMessage) + self.assertEqual(s.errors[0].code, 1007) + + def test_invalid_encoded_bytes_on_continuation(self): + s = Stream() + + f = Frame(opcode=OPCODE_TEXT, body=b'hello', + fin=0, masking_key=os.urandom(4)).build() + s.parser.send(f) + next(s.parser) + + f = Frame(opcode=OPCODE_CONTINUATION, body=b'h\xc3llo', + fin=1, masking_key=os.urandom(4)).build() + s.parser.send(f) + next(s.parser) + + self.assertNotEqual(s.errors, []) + self.assertIsInstance(s.errors[0], CloseControlMessage) + self.assertEqual(s.errors[0].code, 1007) + + def test_too_large_close_message(self): + payload = struct.pack("!H", 1000) + b'*' * 330 + f = Frame(opcode=OPCODE_CLOSE, body=payload, + fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(len(s.errors), 0) + self.assertEqual(s.closing, None) + s.parser.send(f) + self.assertEqual(s.closing, None) + + self.assertEqual(len(s.errors), 1) + self.assertEqual(type(s.errors[0]), CloseControlMessage) + self.assertEqual(s.errors[0].code, 1002) + + def test_invalid_sized_close_message(self): + payload = b'boom' + f = Frame(opcode=OPCODE_CLOSE, body=payload, + fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(len(s.errors), 0) + self.assertEqual(s.closing, None) + s.parser.send(f) + self.assertEqual(type(s.closing), CloseControlMessage) + self.assertEqual(s.closing.code, 1005) + + def test_close_message_of_size_one_are_invalid(self): + payload = b'*' + f = Frame(opcode=OPCODE_CLOSE, body=payload, + fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(len(s.errors), 0) + self.assertEqual(s.closing, None) + s.parser.send(f) + self.assertEqual(type(s.closing), CloseControlMessage) + self.assertEqual(s.closing.code, 1005) + + def test_invalid_close_message_type(self): + payload = struct.pack("!H", 1500) + b'hello' + f = Frame(opcode=OPCODE_CLOSE, body=payload, + fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(len(s.errors), 0) + self.assertEqual(s.closing, None) + s.parser.send(f) + self.assertEqual(type(s.closing), CloseControlMessage) + self.assertEqual(s.closing.code, 1005) + + def test_invalid_close_message_reason_encoding(self): + payload = struct.pack("!H", 1000) + b'h\xc3llo' + f = Frame(opcode=OPCODE_CLOSE, body=payload, + fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(len(s.errors), 0) + self.assertEqual(s.closing, None) + s.parser.send(f) + self.assertEqual(s.closing, None) + self.assertEqual(type(s.errors[0]), CloseControlMessage) + self.assertEqual(s.errors[0].code, 1007) + + def test_protocol_exception_from_frame_parsing(self): + payload = struct.pack("!H", 1000) + b'hello' + f = Frame(opcode=OPCODE_CLOSE, body=payload, + fin=1, masking_key=os.urandom(4)) + f.rsv1 = 1 + f = f.build() + s = Stream() + self.assertEqual(len(s.errors), 0) + self.assertEqual(s.closing, None) + s.parser.send(f) + self.assertEqual(s.closing, None) + self.assertEqual(type(s.errors[0]), CloseControlMessage) + self.assertEqual(s.errors[0].code, 1002) + + def test_close_message_received(self): + payload = struct.pack("!H", 1000) + b'hello' + f = Frame(opcode=OPCODE_CLOSE, body=payload, + fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(s.closing, None) + s.parser.send(f) + self.assertEqual(type(s.closing), CloseControlMessage) + self.assertEqual(s.closing.code, 1000) + self.assertEqual(s.closing.reason, b'hello') + + def test_ping_message_received(self): + msg = b'ping me' + f = Frame(opcode=OPCODE_PING, body=msg, fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(len(s.pings), 0) + s.parser.send(f) + self.assertEqual(len(s.pings), 1) + + def test_pong_message_received(self): + msg = b'pong!' + f = Frame(opcode=OPCODE_PONG, body=msg, fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(len(s.pongs), 0) + s.parser.send(f) + self.assertEqual(len(s.pongs), 1) + + def test_text_message_received(self): + msg = b'hello there' + f = Frame(opcode=OPCODE_TEXT, body=msg, fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(len(s.messages), 0) + s.parser.send(f) + self.assertEqual(len(s.messages), 1) + + def test_incremental_text_message_received(self): + msg = b'hello there' + f = Frame(opcode=OPCODE_TEXT, body=msg, fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(s.has_message, False) + bytes = f + for index, byte in enumerate(bytes): + s.parser.send(bytes[index:index+1]) + self.assertEqual(s.has_message, True) + + def test_text_message_received(self): + msg = b'hello there' + f = Frame(opcode=OPCODE_TEXT, body=msg, fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(s.has_message, False) + s.parser.send(f) + self.assertEqual(s.message.completed, True) + + def test_text_message_with_continuation_received(self): + msg = b'hello there' + f = Frame(opcode=OPCODE_TEXT, body=msg, fin=0, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(s.has_message, False) + s.parser.send(f) + self.assertEqual(s.message.completed, False) + + for i in range(3): + f = Frame(opcode=OPCODE_CONTINUATION, body=msg, fin=0, masking_key=os.urandom(4)).build() + s.parser.send(f) + self.assertEqual(s.has_message, False) + self.assertEqual(s.message.completed, False) + self.assertEqual(s.message.opcode, OPCODE_TEXT) + + f = Frame(opcode=OPCODE_CONTINUATION, body=msg, fin=1, masking_key=os.urandom(4)).build() + s.parser.send(f) + self.assertEqual(s.has_message, True) + self.assertEqual(s.message.completed, True) + self.assertEqual(s.message.opcode, OPCODE_TEXT) + + def test_text_message_with_continuation_and_ping_in_between(self): + msg = b'hello there' + key = os.urandom(4) + f = Frame(opcode=OPCODE_TEXT, body=msg, fin=0, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(s.has_message, False) + s.parser.send(f) + self.assertEqual(s.message.completed, False) + + for i in range(3): + f = Frame(opcode=OPCODE_CONTINUATION, body=msg, fin=0, masking_key=os.urandom(4)).build() + s.parser.send(f) + self.assertEqual(s.has_message, False) + self.assertEqual(s.message.completed, False) + self.assertEqual(s.message.opcode, OPCODE_TEXT) + + f = Frame(opcode=OPCODE_PING, body=b'ping me', fin=1, masking_key=os.urandom(4)).build() + self.assertEqual(len(s.pings), i) + s.parser.send(f) + self.assertEqual(len(s.pings), i+1) + + f = Frame(opcode=OPCODE_CONTINUATION, body=msg, fin=1, masking_key=os.urandom(4)).build() + s.parser.send(f) + self.assertEqual(s.has_message, True) + self.assertEqual(s.message.opcode, OPCODE_TEXT) + self.assertEqual(s.message.completed, True) + + def test_binary_message_received(self): + msg = os.urandom(16) + f = Frame(opcode=OPCODE_BINARY, body=msg, fin=1, masking_key=os.urandom(4)).build() + s = Stream() + self.assertEqual(s.has_message, False) + s.parser.send(f) + self.assertEqual(s.message.completed, True) + + def test_binary_message_with_continuation_received(self): + msg = os.urandom(16) + key = os.urandom(4) + f = Frame(opcode=OPCODE_BINARY, body=msg, fin=0, masking_key=key).build() + s = Stream() + self.assertEqual(s.has_message, False) + s.parser.send(f) + self.assertEqual(s.has_message, False) + + for i in range(3): + f = Frame(opcode=OPCODE_CONTINUATION, body=msg, fin=0, masking_key=key).build() + s.parser.send(f) + self.assertEqual(s.has_message, False) + self.assertEqual(s.message.completed, False) + self.assertEqual(s.message.opcode, OPCODE_BINARY) + + f = Frame(opcode=OPCODE_CONTINUATION, body=msg, fin=1, masking_key=key).build() + s.parser.send(f) + self.assertEqual(s.has_message, True) + self.assertEqual(s.message.completed, True) + self.assertEqual(s.message.opcode, OPCODE_BINARY) + + def test_helper_with_unicode_text_message(self): + s = Stream() + m = s.text_message(u'hello there!') + self.assertIsInstance(m, TextMessage) + self.assertFalse(m.is_binary) + self.assertTrue(m.is_text) + self.assertEqual(m.opcode, OPCODE_TEXT) + self.assertEqual(m.encoding, 'utf-8') + self.assertIsInstance(m.data, bytes) + self.assertEqual(len(m), 12) + self.assertEqual(len(m.data), 12) + self.assertEqual(m.data, b'hello there!') + + def test_helper_with_bytes_text_message(self): + s = Stream() + m = s.text_message('hello there!') + self.assertIsInstance(m, TextMessage) + self.assertFalse(m.is_binary) + self.assertTrue(m.is_text) + self.assertEqual(m.opcode, OPCODE_TEXT) + self.assertEqual(m.encoding, 'utf-8') + self.assertIsInstance(m.data, bytes) + self.assertEqual(len(m), 12) + self.assertEqual(len(m.data), 12) + self.assertEqual(m.data, b'hello there!') + + def test_helper_with_binary_message(self): + msg = os.urandom(16) + s = Stream() + m = s.binary_message(msg) + self.assertIsInstance(m, BinaryMessage) + self.assertTrue(m.is_binary) + self.assertFalse(m.is_text) + self.assertEqual(m.opcode, OPCODE_BINARY) + self.assertIsInstance(m.data, bytes) + self.assertEqual(len(m), 16) + self.assertEqual(len(m.data), 16) + self.assertEqual(m.data, msg) + + def test_helper_ping_message(self): + s = Stream() + m = s.ping('sos') + self.assertIsInstance(m, bytes) + self.assertEqual(len(m), 5) + + def test_helper_masked_ping_message(self): + s = Stream(always_mask=True) + m = s.ping('sos') + self.assertIsInstance(m, bytes) + self.assertEqual(len(m), 9) + + def test_helper_pong_message(self): + s = Stream() + m = s.pong('sos') + self.assertIsInstance(m, bytes) + self.assertEqual(len(m), 5) + + def test_helper_masked_pong_message(self): + s = Stream(always_mask=True) + m = s.pong('sos') + self.assertIsInstance(m, bytes) + self.assertEqual(len(m), 9) + + def test_closing_parser_should_release_resources(self): + f = Frame(opcode=OPCODE_TEXT, body=b'hello', + fin=1, masking_key=os.urandom(4)).build() + s = Stream() + s.parser.send(f) + s.parser.close() + + +if __name__ == '__main__': + suite = unittest.TestSuite() + loader = unittest.TestLoader() + for testcase in [WSStreamTest]: + tests = loader.loadTestsFromTestCase(testcase) + suite.addTests(tests) + unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/JUNK/WebSocket-for-Python-master/test/test_utils.py b/JUNK/WebSocket-for-Python-master/test/test_utils.py new file mode 100644 index 0000000..4f21afd --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/test/test_utils.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +import unittest + +from ws4py import format_addresses +from ws4py.websocket import WebSocket +from mock import MagicMock + +class WSUtilities(unittest.TestCase): + def test_format_address(self): + m = MagicMock() + m.getsockname.return_value = ('127.0.0.1', 52300, None, None) + m.getpeername.return_value = ('127.0.0.1', 4800, None, None) + ws = WebSocket(sock=m) + + log = format_addresses(ws) + self.assertEqual(log, "[Local => 127.0.0.1:52300 | Remote => 127.0.0.1:4800]") + +if __name__ == '__main__': + suite = unittest.TestSuite() + loader = unittest.TestLoader() + for testcase in [WSUtilities]: + tests = loader.loadTestsFromTestCase(testcase) + suite.addTests(tests) + unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/JUNK/WebSocket-for-Python-master/test/test_websocket.py b/JUNK/WebSocket-for-Python-master/test/test_websocket.py new file mode 100644 index 0000000..96fb384 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/test/test_websocket.py @@ -0,0 +1,187 @@ +# -*- coding: utf-8 -*- +import unittest +import os +import socket +import struct + +from mock import MagicMock, call, patch + +from ws4py.framing import Frame, \ + OPCODE_CONTINUATION, OPCODE_TEXT, \ + OPCODE_BINARY, OPCODE_CLOSE, OPCODE_PING, OPCODE_PONG +from ws4py.websocket import WebSocket +from ws4py.messaging import TextMessage, BinaryMessage, \ + CloseControlMessage, PingControlMessage, PongControlMessage +from ws4py.compat import * + +class WSWebSocketTest(unittest.TestCase): + def test_get_ipv4_addresses(self): + m = MagicMock() + m.getsockname.return_value = ('127.0.0.1', 52300) + m.getpeername.return_value = ('127.0.0.1', 4800) + ws = WebSocket(sock=m) + self.assertEqual(ws.local_address, ('127.0.0.1', 52300)) + self.assertEqual(ws.peer_address, ('127.0.0.1', 4800)) + + def test_get_ipv6_addresses(self): + m = MagicMock() + m.getsockname.return_value = ('127.0.0.1', 52300, None, None) + m.getpeername.return_value = ('127.0.0.1', 4800, None, None) + ws = WebSocket(sock=m) + self.assertEqual(ws.local_address, ('127.0.0.1', 52300)) + self.assertEqual(ws.peer_address, ('127.0.0.1', 4800)) + + def test_get_underlying_connection(self): + m = MagicMock() + ws = WebSocket(sock=m) + self.assertEqual(ws.connection, m) + + def test_close_connection(self): + m = MagicMock() + ws = WebSocket(sock=m) + ws.close_connection() + m.shutdown.assert_called_once_with(socket.SHUT_RDWR) + m.close.assert_called_once_with() + self.assertIsNone(ws.connection) + + m = MagicMock() + m.close = MagicMock(side_effect=RuntimeError) + ws = WebSocket(sock=m) + ws.close_connection() + self.assertIsNone(ws.connection) + + def test_terminate_with_closing(self): + m = MagicMock() + s = MagicMock() + c = MagicMock() + cc = MagicMock() + + ws = WebSocket(sock=m) + with patch.multiple(ws, closed=c, close_connection=cc): + ws.stream = s + ws.stream.closing = CloseControlMessage(code=1000, reason='test closing') + ws.terminate() + self.assertTrue(ws.client_terminated) + self.assertTrue(ws.server_terminated) + self.assertTrue(ws.terminated) + c.assert_called_once_with(1000, b'test closing') + cc.assert_called_once_with() + self.assertIsNone(ws.stream) + self.assertIsNone(ws.environ) + + def test_terminate_without_closing(self): + m = MagicMock() + s = MagicMock() + c = MagicMock() + cc = MagicMock() + + ws = WebSocket(sock=m) + with patch.multiple(ws, closed=c, close_connection=cc): + ws.stream = s + ws.stream.closing = None + ws.terminate() + self.assertTrue(ws.client_terminated) + self.assertTrue(ws.server_terminated) + self.assertTrue(ws.terminated) + c.assert_called_once_with(1006, "Going away") + cc.assert_called_once_with() + self.assertIsNone(ws.stream) + self.assertIsNone(ws.environ) + + def test_cannot_process_more_data_when_stream_is_terminated(self): + m = MagicMock() + ws = WebSocket(sock=m) + ws.client_terminated = True + ws.server_terminated = True + + self.assertFalse(ws.once()) + + def test_socket_error_on_receiving_more_bytes(self): + m = MagicMock() + m.recv = MagicMock(side_effect=socket.error) + ws = WebSocket(sock=m) + self.assertFalse(ws.once()) + + def test_no_bytes_were_read(self): + m = MagicMock(spec=socket.socket) + m.recv.return_value = b'' + ws = WebSocket(sock=m) + self.assertFalse(ws.once()) + + def test_send_bytes_without_masking(self): + tm = TextMessage(b'hello world').single() + + m = MagicMock() + ws = WebSocket(sock=m) + ws.send(b'hello world') + m.sendall.assert_called_once_with(tm) + + def test_send_bytes_with_masking(self): + tm = TextMessage(b'hello world').single(mask=True) + + m = MagicMock() + ws = WebSocket(sock=m) + ws.stream = MagicMock() + ws.stream.always_mask = True + ws.stream.text_message.return_value.single.return_value = tm + + ws.send(b'hello world') + m.sendall.assert_called_once_with(tm) + + def test_send_message_without_masking(self): + tm = TextMessage(b'hello world') + + m = MagicMock() + ws = WebSocket(sock=m) + ws.send(tm) + m.sendall.assert_called_once_with(tm.single()) + + def test_send_generator_without_masking(self): + tm0 = b'hello' + tm1 = b'world' + + def datasource(): + yield tm0 + yield tm1 + + gen = datasource() + + m = MagicMock() + ws = WebSocket(sock=m) + ws.send(gen) + self.assertEqual(m.sendall.call_count, 2) + self.assertRaises(StopIteration, next, gen) + + def test_sending_unknown_datetype(self): + m = MagicMock() + ws = WebSocket(sock=m) + self.assertRaises(ValueError, ws.send, 123) + + def test_closing_message_received(self): + s = MagicMock() + m = MagicMock() + c = MagicMock() + + ws = WebSocket(sock=m) + with patch.multiple(ws, close=c): + ws.stream = s + ws.stream.closing = CloseControlMessage(code=1000, reason='test closing') + ws.process(b'unused for this test') + c.assert_called_once_with(1000, b'test closing') + + def test_sending_ping(self): + tm = PingControlMessage("hello").single(mask=False) + + m = MagicMock() + ws = WebSocket(sock=m) + ws.ping("hello") + m.sendall.assert_called_once_with(tm) + + +if __name__ == '__main__': + suite = unittest.TestSuite() + loader = unittest.TestLoader() + for testcase in [WSWebSocketTest]: + tests = loader.loadTestsFromTestCase(testcase) + suite.addTests(tests) + unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/JUNK/WebSocket-for-Python-master/tox.ini b/JUNK/WebSocket-for-Python-master/tox.ini new file mode 100644 index 0000000..6621a19 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/tox.ini @@ -0,0 +1,10 @@ +# Tox (http://tox.testrun.org/) is a tool for running tests +# in multiple virtualenvs. This configuration file will run the +# test suite on all supported python versions. To use it, "pip install tox" +# and then run "tox" from this directory. + +[tox] +envlist = py27 + +[testenv] +commands = python setup.py test diff --git a/JUNK/WebSocket-for-Python-master/ws4py/LICENSE b/JUNK/WebSocket-for-Python-master/ws4py/LICENSE new file mode 100644 index 0000000..0c8003c --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/LICENSE @@ -0,0 +1,29 @@ +NOTICE: The version of ws4py included with kaithem has been modified. + + +Copyright (c) 2011-2015, Sylvain Hellegouarch +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of ws4py nor the names of its contributors may be used + to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/JUNK/WebSocket-for-Python-master/ws4py/__init__.py b/JUNK/WebSocket-for-Python-master/ws4py/__init__.py new file mode 100644 index 0000000..9bd0378 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/__init__.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of ws4py nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +import logging +import logging.handlers as handlers + +__author__ = "Sylvain Hellegouarch" +__version__ = "0.4.3.dev0" +__all__ = ['WS_KEY', 'WS_VERSION', 'configure_logger', 'format_addresses'] + +WS_KEY = b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11" +WS_VERSION = (8, 13) + +def configure_logger(stdout=True, filepath=None, level=logging.INFO): + logger = logging.getLogger('ws4py') + logger.setLevel(level) + logfmt = logging.Formatter("[%(asctime)s] %(levelname)s %(message)s") + + if filepath: + h = handlers.RotatingFileHandler(filepath, maxBytes=10485760, backupCount=3) + h.setLevel(level) + h.setFormatter(logfmt) + logger.addHandler(h) + + if stdout: + import sys + h = logging.StreamHandler(sys.stdout) + h.setLevel(level) + h.setFormatter(logfmt) + logger.addHandler(h) + + return logger + +def format_addresses(ws): + me = ws.local_address + peer = ws.peer_address + if isinstance(me, tuple) and isinstance(peer, tuple): + me_ip, me_port = ws.local_address + peer_ip, peer_port = ws.peer_address + return "[Local => %s:%d | Remote => %s:%d]" % (me_ip, me_port, peer_ip, peer_port) + + return "[Bound to '%s']" % me diff --git a/JUNK/WebSocket-for-Python-master/ws4py/async_websocket.py b/JUNK/WebSocket-for-Python-master/ws4py/async_websocket.py new file mode 100644 index 0000000..9e2a4c7 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/async_websocket.py @@ -0,0 +1,126 @@ +# -*- coding: utf-8 -*- +__doc__ = """ +WebSocket implementation that relies on two new Python +features: + +* asyncio to provide the high-level interface above transports +* yield from to delegate to the reading stream whenever more + bytes are required + +You can use these implementations in that context +and benefit from those features whilst using ws4py. + +Strictly speaking this module probably doesn't have to +be called async_websocket but it feels this will be its typical +usage and is probably more readable than +delegated_generator_websocket_on_top_of_asyncio.py +""" +import asyncio +import types + +from ws4py.websocket import WebSocket as _WebSocket +from ws4py.messaging import Message + +__all__ = ['WebSocket', 'EchoWebSocket'] + +class WebSocket(_WebSocket): + def __init__(self, proto): + """ + A :pep:`3156` ready websocket handler that works + well in a coroutine-aware loop such as the one provided + by the asyncio module. + + The provided `proto` instance is a + :class:`asyncio.Protocol` subclass instance that will + be used internally to read and write from the + underlying transport. + + Because the base :class:`ws4py.websocket.WebSocket` + class is still coupled a bit to the socket interface, + we have to override a little more than necessary + to play nice with the :pep:`3156` interface. Hopefully, + some day this will be cleaned out. + """ + _WebSocket.__init__(self, None) + self.started = False + self.proto = proto + + @property + def local_address(self): + """ + Local endpoint address as a tuple + """ + if not self._local_address: + self._local_address = self.proto.reader.transport.get_extra_info('sockname') + if len(self._local_address) == 4: + self._local_address = self._local_address[:2] + return self._local_address + + @property + def peer_address(self): + """ + Peer endpoint address as a tuple + """ + if not self._peer_address: + self._peer_address = self.proto.reader.transport.get_extra_info('peername') + if len(self._peer_address) == 4: + self._peer_address = self._peer_address[:2] + return self._peer_address + + def once(self): + """ + The base class directly is used in conjunction with + the :class:`ws4py.manager.WebSocketManager` which is + not actually used with the asyncio implementation + of ws4py. So let's make it clear it shan't be used. + """ + raise NotImplemented() + + def close_connection(self): + """ + Close the underlying transport + """ + @asyncio.coroutine + def closeit(): + yield from self.proto.writer.drain() + self.proto.writer.close() + asyncio.async(closeit()) + + def _write(self, data): + """ + Write to the underlying transport + """ + @asyncio.coroutine + def sendit(data): + self.proto.writer.write(data) + yield from self.proto.writer.drain() + asyncio.async(sendit(data)) + + @asyncio.coroutine + def run(self): + """ + Coroutine that runs until the websocket + exchange is terminated. It also calls the + `opened()` method to indicate the exchange + has started. + """ + self.started = True + try: + self.opened() + reader = self.proto.reader + while True: + data = yield from reader.read(self.reading_buffer_size) + if not self.process(data): + return False + finally: + self.terminate() + + return True + +class EchoWebSocket(WebSocket): + def received_message(self, message): + """ + Automatically sends back the provided ``message`` to + its originating endpoint. + """ + self.send(message.data, message.is_binary) diff --git a/JUNK/WebSocket-for-Python-master/ws4py/client/__init__.py b/JUNK/WebSocket-for-Python-master/ws4py/client/__init__.py new file mode 100644 index 0000000..e6dc7a0 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/client/__init__.py @@ -0,0 +1,344 @@ +# -*- coding: utf-8 -*- +from base64 import b64encode +from hashlib import sha1 +import os +import socket +import ssl + +from ws4py import WS_KEY, WS_VERSION +from ws4py.exc import HandshakeError +from ws4py.websocket import WebSocket +from ws4py.compat import urlsplit + +__all__ = ['WebSocketBaseClient'] + +class WebSocketBaseClient(WebSocket): + def __init__(self, url, protocols=None, extensions=None, + heartbeat_freq=None, ssl_options=None, headers=None, exclude_headers=None): + """ + A websocket client that implements :rfc:`6455` and provides a simple + interface to communicate with a websocket server. + + This class works on its own but will block if not run in + its own thread. + + When an instance of this class is created, a :py:mod:`socket` + is created. If the connection is a TCP socket, + the nagle's algorithm is disabled. + + The address of the server will be extracted from the given + websocket url. + + The websocket key is randomly generated, reset the + `key` attribute if you want to provide yours. + + For instance to create a TCP client: + + .. code-block:: python + + >>> from websocket.client import WebSocketBaseClient + >>> ws = WebSocketBaseClient('ws://localhost/ws') + + + Here is an example for a TCP client over SSL: + + .. code-block:: python + + >>> from websocket.client import WebSocketBaseClient + >>> ws = WebSocketBaseClient('wss://localhost/ws') + + + Finally an example of a Unix-domain connection: + + .. code-block:: python + + >>> from websocket.client import WebSocketBaseClient + >>> ws = WebSocketBaseClient('ws+unix:///tmp/my.sock') + + Note that in this case, the initial Upgrade request + will be sent to ``/``. You may need to change this + by setting the resource explicitely before connecting: + + .. code-block:: python + + >>> from websocket.client import WebSocketBaseClient + >>> ws = WebSocketBaseClient('ws+unix:///tmp/my.sock') + >>> ws.resource = '/ws' + >>> ws.connect() + + You may provide extra headers by passing a list of tuples + which must be unicode objects. + + """ + self.url = url + self.host = None + self.scheme = None + self.port = None + self.unix_socket_path = None + self.resource = None + self.ssl_options = ssl_options or {} + self.extra_headers = headers or [] + self.exclude_headers = exclude_headers or [] + self.exclude_headers = [x.lower() for x in self.exclude_headers] + + if self.scheme == "wss": + # Prevent check_hostname requires server_hostname (ref #187) + if "cert_reqs" not in self.ssl_options: + self.ssl_options["cert_reqs"] = ssl.CERT_NONE + + self._parse_url() + + if self.unix_socket_path: + sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM, 0) + else: + # Let's handle IPv4 and IPv6 addresses + # Simplified from CherryPy's code + try: + family, socktype, proto, canonname, sa = socket.getaddrinfo(self.host, self.port, + socket.AF_UNSPEC, + socket.SOCK_STREAM, + 0, socket.AI_PASSIVE)[0] + except socket.gaierror: + family = socket.AF_INET + if self.host.startswith('::'): + family = socket.AF_INET6 + + socktype = socket.SOCK_STREAM + proto = 0 + canonname = "" + sa = (self.host, self.port, 0, 0) + + sock = socket.socket(family, socktype, proto) + sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) + sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + if hasattr(socket, 'AF_INET6') and family == socket.AF_INET6 and \ + self.host.startswith('::'): + try: + sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0) + except (AttributeError, socket.error): + pass + + WebSocket.__init__(self, sock, protocols=protocols, + extensions=extensions, + heartbeat_freq=heartbeat_freq) + + self.stream.always_mask = True + self.stream.expect_masking = False + self.key = b64encode(os.urandom(16)) + + # Adpated from: https://github.com/liris/websocket-client/blob/master/websocket.py#L105 + def _parse_url(self): + """ + Parses a URL which must have one of the following forms: + + - ws://host[:port][path] + - wss://host[:port][path] + - ws+unix:///path/to/my.socket + + In the first two cases, the ``host`` and ``port`` + attributes will be set to the parsed values. If no port + is explicitely provided, it will be either 80 or 443 + based on the scheme. Also, the ``resource`` attribute is + set to the path segment of the URL (alongside any querystring). + + In addition, if the scheme is ``ws+unix``, the + ``unix_socket_path`` attribute is set to the path to + the Unix socket while the ``resource`` attribute is + set to ``/``. + """ + # Python 2.6.1 and below don't parse ws or wss urls properly. netloc is empty. + # See: https://github.com/Lawouach/WebSocket-for-Python/issues/59 + scheme, url = self.url.split(":", 1) + + parsed = urlsplit(url, scheme="http") + if parsed.hostname: + self.host = parsed.hostname + elif '+unix' in scheme: + self.host = 'localhost' + else: + raise ValueError("Invalid hostname from: %s", self.url) + + if parsed.port: + self.port = parsed.port + + if scheme == "ws": + if not self.port: + self.port = 80 + elif scheme == "wss": + if not self.port: + self.port = 443 + elif scheme in ('ws+unix', 'wss+unix'): + pass + else: + raise ValueError("Invalid scheme: %s" % scheme) + + if parsed.path: + resource = parsed.path + else: + resource = "/" + + if '+unix' in scheme: + self.unix_socket_path = resource + resource = '/' + + if parsed.query: + resource += "?" + parsed.query + + self.scheme = scheme + self.resource = resource + + @property + def bind_addr(self): + """ + Returns the Unix socket path if or a tuple + ``(host, port)`` depending on the initial + URL's scheme. + """ + return self.unix_socket_path or (self.host, self.port) + + def close(self, code=1000, reason=''): + """ + Initiate the closing handshake with the server. + """ + if not self.client_terminated: + self.client_terminated = True + self._write(self.stream.close(code=code, reason=reason).single(mask=True)) + + def connect(self): + """ + Connects this websocket and starts the upgrade handshake + with the remote endpoint. + """ + if self.scheme == "wss": + # default port is now 443; upgrade self.sender to send ssl + self.sock = ssl.wrap_socket(self.sock, **self.ssl_options) + self._is_secure = True + + self.sock.connect(self.bind_addr) + + self._write(self.handshake_request) + + response = b'' + doubleCLRF = b'\r\n\r\n' + while True: + bytes = self.sock.recv(128) + if not bytes: + break + response += bytes + if doubleCLRF in response: + break + + if not response: + self.close_connection() + raise HandshakeError("Invalid response") + + headers, _, body = response.partition(doubleCLRF) + response_line, _, headers = headers.partition(b'\r\n') + + try: + self.process_response_line(response_line) + self.protocols, self.extensions = self.process_handshake_header(headers) + except HandshakeError: + self.close_connection() + raise + + self.handshake_ok() + if body: + self.process(body) + + @property + def handshake_headers(self): + """ + List of headers appropriate for the upgrade + handshake. + """ + headers = [ + ('Host', '%s:%s' % (self.host, self.port)), + ('Connection', 'Upgrade'), + ('Upgrade', 'websocket'), + ('Sec-WebSocket-Key', self.key.decode('utf-8')), + ('Sec-WebSocket-Version', str(max(WS_VERSION))) + ] + + if self.protocols: + headers.append(('Sec-WebSocket-Protocol', ','.join(self.protocols))) + + if self.extra_headers: + headers.extend(self.extra_headers) + + if not any(x for x in headers if x[0].lower() == 'origin') and \ + 'origin' not in self.exclude_headers: + + scheme, url = self.url.split(":", 1) + parsed = urlsplit(url, scheme="http") + if parsed.hostname: + self.host = parsed.hostname + else: + self.host = 'localhost' + origin = scheme + '://' + self.host + if parsed.port: + origin = origin + ':' + str(parsed.port) + headers.append(('Origin', origin)) + + headers = [x for x in headers if x[0].lower() not in self.exclude_headers] + + return headers + + @property + def handshake_request(self): + """ + Prepare the request to be sent for the upgrade handshake. + """ + headers = self.handshake_headers + request = [("GET %s HTTP/1.1" % self.resource).encode('utf-8')] + for header, value in headers: + request.append(("%s: %s" % (header, value)).encode('utf-8')) + request.append(b'\r\n') + + return b'\r\n'.join(request) + + def process_response_line(self, response_line): + """ + Ensure that we received a HTTP `101` status code in + response to our request and if not raises :exc:`HandshakeError`. + """ + protocol, code, status = response_line.split(b' ', 2) + if code != b'101': + raise HandshakeError("Invalid response status: %s %s" % (code, status)) + + def process_handshake_header(self, headers): + """ + Read the upgrade handshake's response headers and + validate them against :rfc:`6455`. + """ + protocols = [] + extensions = [] + + headers = headers.strip() + + for header_line in headers.split(b'\r\n'): + header, value = header_line.split(b':', 1) + header = header.strip().lower() + value = value.strip().lower() + + if header == b'upgrade' and value != b'websocket': + raise HandshakeError("Invalid Upgrade header: %s" % value) + + elif header == b'connection' and value != b'upgrade': + raise HandshakeError("Invalid Connection header: %s" % value) + + elif header == b'sec-websocket-accept': + match = b64encode(sha1(self.key + WS_KEY).digest()) + if value != match.lower(): + raise HandshakeError("Invalid challenge response: %s" % value) + + elif header == b'sec-websocket-protocol': + protocols = ','.join(value) + + elif header == b'sec-websocket-extensions': + extensions = ','.join(value) + + return protocols, extensions + + def handshake_ok(self): + self.opened() diff --git a/JUNK/WebSocket-for-Python-master/ws4py/client/geventclient.py b/JUNK/WebSocket-for-Python-master/ws4py/client/geventclient.py new file mode 100644 index 0000000..69703f7 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/client/geventclient.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +import copy + +import gevent +from gevent import Greenlet +from gevent.queue import Queue + +from ws4py.client import WebSocketBaseClient + +__all__ = ['WebSocketClient'] + +class WebSocketClient(WebSocketBaseClient): + def __init__(self, url, protocols=None, extensions=None, heartbeat_freq=None, ssl_options=None, headers=None, exclude_headers=None): + """ + WebSocket client that executes the + :meth:`run() ` into a gevent greenlet. + + .. code-block:: python + + ws = WebSocketClient('ws://localhost:9000/echo', protocols=['http-only', 'chat']) + ws.connect() + + ws.send("Hello world") + + def incoming(): + while True: + m = ws.receive() + if m is not None: + print str(m) + else: + break + + def outgoing(): + for i in range(0, 40, 5): + ws.send("*" * i) + + greenlets = [ + gevent.spawn(incoming), + gevent.spawn(outgoing), + ] + gevent.joinall(greenlets) + """ + WebSocketBaseClient.__init__(self, url, protocols, extensions, heartbeat_freq, + ssl_options=ssl_options, headers=headers, exclude_headers=exclude_headers) + self._th = Greenlet(self.run) + + self.messages = Queue() + """ + Queue that will hold received messages. + """ + + def handshake_ok(self): + """ + Called when the upgrade handshake has completed + successfully. + + Starts the client's thread. + """ + self._th.start() + + def received_message(self, message): + """ + Override the base class to store the incoming message + in the `messages` queue. + """ + self.messages.put(copy.deepcopy(message)) + + def closed(self, code, reason=None): + """ + Puts a :exc:`StopIteration` as a message into the + `messages` queue. + """ + # When the connection is closed, put a StopIteration + # on the message queue to signal there's nothing left + # to wait for + self.messages.put(StopIteration) + + def receive(self): + """ + Returns messages that were stored into the + `messages` queue and returns `None` when the + websocket is terminated or closed. + """ + # If the websocket was terminated and there are no messages + # left in the queue, return None immediately otherwise the client + # will block forever + if self.terminated and self.messages.empty(): + return None + message = self.messages.get() + if message is StopIteration: + return None + return message diff --git a/JUNK/WebSocket-for-Python-master/ws4py/client/threadedclient.py b/JUNK/WebSocket-for-Python-master/ws4py/client/threadedclient.py new file mode 100644 index 0000000..b033f32 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/client/threadedclient.py @@ -0,0 +1,98 @@ +# -*- coding: utf-8 -*- +import threading + +from ws4py.client import WebSocketBaseClient + +__all__ = ['WebSocketClient'] + +class WebSocketClient(WebSocketBaseClient): + def __init__(self, url, protocols=None, extensions=None, heartbeat_freq=None, + ssl_options=None, headers=None, exclude_headers=None): + """ + .. code-block:: python + + from ws4py.client.threadedclient import WebSocketClient + + class EchoClient(WebSocketClient): + def opened(self): + for i in range(0, 200, 25): + self.send("*" * i) + + def closed(self, code, reason): + print(("Closed down", code, reason)) + + def received_message(self, m): + print("=> %d %s" % (len(m), str(m))) + + try: + ws = EchoClient('ws://localhost:9000/echo', protocols=['http-only', 'chat']) + ws.connect() + except KeyboardInterrupt: + ws.close() + + """ + WebSocketBaseClient.__init__(self, url, protocols, extensions, heartbeat_freq, + ssl_options, headers=headers, exclude_headers=exclude_headers) + self._th = threading.Thread(target=self.run, name='WebSocketClient') + self._th.daemon = True + + @property + def daemon(self): + """ + `True` if the client's thread is set to be a daemon thread. + """ + return self._th.daemon + + @daemon.setter + def daemon(self, flag): + """ + Set to `True` if the client's thread should be a daemon. + """ + self._th.daemon = flag + + def run_forever(self): + """ + Simply blocks the thread until the + websocket has terminated. + """ + while not self.terminated: + self._th.join(timeout=0.1) + + def handshake_ok(self): + """ + Called when the upgrade handshake has completed + successfully. + + Starts the client's thread. + """ + self._th.start() + +if __name__ == '__main__': + from ws4py.client.threadedclient import WebSocketClient + + class EchoClient(WebSocketClient): + def opened(self): + def data_provider(): + for i in range(0, 200, 25): + yield "#" * i + + self.send(data_provider()) + + for i in range(0, 200, 25): + self.send("*" * i) + + def closed(self, code, reason): + print(("Closed down", code, reason)) + + def received_message(self, m): + print("#%d" % len(m)) + if len(m) == 175: + self.close(reason='bye bye') + + try: + ws = EchoClient('ws://localhost:9000/ws', protocols=['http-only', 'chat'], + headers=[('X-Test', 'hello there')]) + ws.connect() + ws.run_forever() + except KeyboardInterrupt: + ws.close() diff --git a/JUNK/WebSocket-for-Python-master/ws4py/client/tornadoclient.py b/JUNK/WebSocket-for-Python-master/ws4py/client/tornadoclient.py new file mode 100644 index 0000000..22478e6 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/client/tornadoclient.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- +import ssl + +from tornado import iostream, escape +from ws4py.client import WebSocketBaseClient +from ws4py.exc import HandshakeError + +__all__ = ['TornadoWebSocketClient'] + +class TornadoWebSocketClient(WebSocketBaseClient): + def __init__(self, url, protocols=None, extensions=None, + io_loop=None, ssl_options=None, headers=None, exclude_headers=None): + """ + .. code-block:: python + + from tornado import ioloop + + class MyClient(TornadoWebSocketClient): + def opened(self): + for i in range(0, 200, 25): + self.send("*" * i) + + def received_message(self, m): + print((m, len(str(m)))) + + def closed(self, code, reason=None): + ioloop.IOLoop.instance().stop() + + ws = MyClient('ws://localhost:9000/echo', protocols=['http-only', 'chat']) + ws.connect() + + ioloop.IOLoop.instance().start() + """ + WebSocketBaseClient.__init__(self, url, protocols, extensions, + ssl_options=ssl_options, headers=headers, exclude_headers=exclude_headers) + if self.scheme == "wss": + self.sock = ssl.wrap_socket(self.sock, do_handshake_on_connect=False, **self.ssl_options) + self._is_secure = True + self.io = iostream.SSLIOStream(self.sock, io_loop, ssl_options=self.ssl_options) + else: + self.io = iostream.IOStream(self.sock, io_loop) + self.io_loop = io_loop + + def connect(self): + """ + Connects the websocket and initiate the upgrade handshake. + """ + self.io.set_close_callback(self.__connection_refused) + self.io.connect((self.host, int(self.port)), self.__send_handshake) + + def _write(self, b): + """ + Trying to prevent a write operation + on an already closed websocket stream. + + This cannot be bullet proof but hopefully + will catch almost all use cases. + """ + if self.terminated: + raise RuntimeError("Cannot send on a terminated websocket") + + self.io.write(b) + + def __connection_refused(self, *args, **kwargs): + self.server_terminated = True + self.closed(1005, 'Connection refused') + + def __send_handshake(self): + self.io.set_close_callback(self.__connection_closed) + self.io.write(escape.utf8(self.handshake_request), + self.__handshake_sent) + + def __connection_closed(self, *args, **kwargs): + self.server_terminated = True + self.closed(1006, 'Connection closed during handshake') + + def __handshake_sent(self): + self.io.read_until(b"\r\n\r\n", self.__handshake_completed) + + def __handshake_completed(self, data): + self.io.set_close_callback(None) + try: + response_line, _, headers = data.partition(b'\r\n') + self.process_response_line(response_line) + protocols, extensions = self.process_handshake_header(headers) + except HandshakeError: + self.close_connection() + raise + + self.opened() + self.io.set_close_callback(self.__stream_closed) + self.io.read_bytes(self.reading_buffer_size, self.__fetch_more) + + def __fetch_more(self, bytes): + try: + should_continue = self.process(bytes) + except: + should_continue = False + + if should_continue: + self.io.read_bytes(self.reading_buffer_size, self.__fetch_more) + else: + self.__gracefully_terminate() + + def __gracefully_terminate(self): + self.client_terminated = self.server_terminated = True + + try: + if not self.stream.closing: + self.closed(1006) + finally: + self.close_connection() + + def __stream_closed(self, *args, **kwargs): + self.io.set_close_callback(None) + code = 1006 + reason = None + if self.stream.closing: + code, reason = self.stream.closing.code, self.stream.closing.reason + self.closed(code, reason) + self.stream._cleanup() + + def close_connection(self): + """ + Close the underlying connection + """ + self.io.close() + +if __name__ == '__main__': + from tornado import ioloop + + class MyClient(TornadoWebSocketClient): + def opened(self): + def data_provider(): + for i in range(0, 200, 25): + yield "#" * i + + self.send(data_provider()) + + for i in range(0, 200, 25): + self.send("*" * i) + + def received_message(self, m): + print("#%d" % len(m)) + if len(m) == 175: + self.close() + + def closed(self, code, reason=None): + ioloop.IOLoop.instance().stop() + print(("Closed down", code, reason)) + + ws = MyClient('ws://localhost:9000/ws', protocols=['http-only', 'chat']) + ws.connect() + + ioloop.IOLoop.instance().start() diff --git a/JUNK/WebSocket-for-Python-master/ws4py/compat.py b/JUNK/WebSocket-for-Python-master/ws4py/compat.py new file mode 100644 index 0000000..e986e33 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/compat.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +__doc__ = """ +This compatibility module is inspired by the one found +in CherryPy. It provides a common entry point for the various +functions and types that are used with ws4py but which +differ from Python 2.x to Python 3.x + +There are likely better ways for some of them so feel +free to provide patches. + +Note this has been tested against 2.7 and 3.3 only but +should hopefully work fine with other versions too. +""" +import sys + +if sys.version_info >= (3, 0): + py3k = True + from urllib.parse import urlsplit + range = range + unicode = str + basestring = (bytes, str) + _ord = ord + + def get_connection(fileobj): + return fileobj.raw._sock + + def detach_connection(fileobj): + fileobj.detach() + + def ord(c): + if isinstance(c, int): + return c + return _ord(c) +else: + py3k = False + from urlparse import urlsplit + range = xrange + unicode = unicode + basestring = basestring + ord = ord + + def get_connection(fileobj): + return fileobj._sock + + def detach_connection(fileobj): + fileobj._sock = None diff --git a/JUNK/WebSocket-for-Python-master/ws4py/exc.py b/JUNK/WebSocket-for-Python-master/ws4py/exc.py new file mode 100644 index 0000000..bfefea4 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/exc.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- + +__all__ = ['WebSocketException', 'FrameTooLargeException', 'ProtocolException', + 'UnsupportedFrameTypeException', 'TextFrameEncodingException', + 'UnsupportedFrameTypeException', 'TextFrameEncodingException', + 'StreamClosed', 'HandshakeError', 'InvalidBytesError'] + +class WebSocketException(Exception): pass + +class ProtocolException(WebSocketException): pass + +class FrameTooLargeException(WebSocketException): pass + +class UnsupportedFrameTypeException(WebSocketException): pass + +class TextFrameEncodingException(WebSocketException): pass + +class InvalidBytesError(WebSocketException): pass + +class StreamClosed(Exception): pass + +class HandshakeError(WebSocketException): + def __init__(self, msg): + self.msg = msg + + def __str__(self): + return self.msg diff --git a/JUNK/WebSocket-for-Python-master/ws4py/framing.py b/JUNK/WebSocket-for-Python-master/ws4py/framing.py new file mode 100644 index 0000000..5046167 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/framing.py @@ -0,0 +1,273 @@ +# -*- coding: utf-8 -*- +from struct import pack, unpack + +from ws4py.exc import FrameTooLargeException, ProtocolException +from ws4py.compat import py3k, ord, range + +# Frame opcodes defined in the spec. +OPCODE_CONTINUATION = 0x0 +OPCODE_TEXT = 0x1 +OPCODE_BINARY = 0x2 +OPCODE_CLOSE = 0x8 +OPCODE_PING = 0x9 +OPCODE_PONG = 0xa + +__all__ = ['Frame'] + +class Frame(object): + def __init__(self, opcode=None, body=b'', masking_key=None, fin=0, rsv1=0, rsv2=0, rsv3=0): + """ + Implements the framing protocol as defined by RFC 6455. + + .. code-block:: python + :linenos: + + >>> test_mask = 'XXXXXX' # perhaps from os.urandom(4) + >>> f = Frame(OPCODE_TEXT, 'hello world', masking_key=test_mask, fin=1) + >>> bytes = f.build() + >>> bytes.encode('hex') + '818bbe04e66ad6618a06d1249105cc6882' + >>> f = Frame() + >>> f.parser.send(bytes[0]) + 1 + >>> f.parser.send(bytes[1]) + 4 + + .. seealso:: Data Framing http://tools.ietf.org/html/rfc6455#section-5.2 + """ + if not isinstance(body, bytes): + raise TypeError("The body must be properly encoded") + + self.opcode = opcode + self.body = body + self.masking_key = masking_key + self.fin = fin + self.rsv1 = rsv1 + self.rsv2 = rsv2 + self.rsv3 = rsv3 + self.payload_length = len(body) + + self._parser = None + + @property + def parser(self): + if self._parser is None: + self._parser = self._parsing() + # Python generators must be initialized once. + next(self.parser) + return self._parser + + def _cleanup(self): + if self._parser: + self._parser.close() + self._parser = None + + def build(self): + """ + Builds a frame from the instance's attributes and returns + its bytes representation. + """ + header = b'' + + if self.fin > 0x1: + raise ValueError('FIN bit parameter must be 0 or 1') + + if 0x3 <= self.opcode <= 0x7 or 0xB <= self.opcode: + raise ValueError('Opcode cannot be a reserved opcode') + + ## +-+-+-+-+-------+ + ## |F|R|R|R| opcode| + ## |I|S|S|S| (4) | + ## |N|V|V|V| | + ## | |1|2|3| | + ## +-+-+-+-+-------+ + header = pack('!B', ((self.fin << 7) + | (self.rsv1 << 6) + | (self.rsv2 << 5) + | (self.rsv3 << 4) + | self.opcode)) + + ## +-+-------------+-------------------------------+ + ## |M| Payload len | Extended payload length | + ## |A| (7) | (16/63) | + ## |S| | (if payload len==126/127) | + ## |K| | | + ## +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - + + ## | Extended payload length continued, if payload len == 127 | + ## + - - - - - - - - - - - - - - - +-------------------------------+ + if self.masking_key: mask_bit = 1 << 7 + else: mask_bit = 0 + + length = self.payload_length + if length < 126: + header += pack('!B', (mask_bit | length)) + elif length < (1 << 16): + header += pack('!B', (mask_bit | 126)) + pack('!H', length) + elif length < (1 << 63): + header += pack('!B', (mask_bit | 127)) + pack('!Q', length) + else: + raise FrameTooLargeException() + + ## + - - - - - - - - - - - - - - - +-------------------------------+ + ## | |Masking-key, if MASK set to 1 | + ## +-------------------------------+-------------------------------+ + ## | Masking-key (continued) | Payload Data | + ## +-------------------------------- - - - - - - - - - - - - - - - + + ## : Payload Data continued ... : + ## + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + ## | Payload Data continued ... | + ## +---------------------------------------------------------------+ + body = self.body + if not self.masking_key: + return bytes(header + body) + + return bytes(header + self.masking_key + self.mask(body)) + + def _parsing(self): + """ + Generator to parse bytes into a frame. Yields until + enough bytes have been read or an error is met. + """ + buf = b'' + some_bytes = b'' + + # yield until we get the first header's byte + while not some_bytes: + some_bytes = (yield 1) + + first_byte = some_bytes[0] if isinstance(some_bytes, bytearray) else ord(some_bytes[0]) + # frame-fin = %x0 ; more frames of this message follow + # / %x1 ; final frame of this message + self.fin = (first_byte >> 7) & 1 + self.rsv1 = (first_byte >> 6) & 1 + self.rsv2 = (first_byte >> 5) & 1 + self.rsv3 = (first_byte >> 4) & 1 + self.opcode = first_byte & 0xf + + # frame-rsv1 = %x0 ; 1 bit, MUST be 0 unless negotiated otherwise + # frame-rsv2 = %x0 ; 1 bit, MUST be 0 unless negotiated otherwise + # frame-rsv3 = %x0 ; 1 bit, MUST be 0 unless negotiated otherwise + if self.rsv1 or self.rsv2 or self.rsv3: + raise ProtocolException() + + # control frames between 3 and 7 as well as above 0xA are currently reserved + if 2 < self.opcode < 8 or self.opcode > 0xA: + raise ProtocolException() + + # control frames cannot be fragmented + if self.opcode > 0x7 and self.fin == 0: + raise ProtocolException() + + # do we already have enough some_bytes to continue? + some_bytes = some_bytes[1:] if some_bytes and len(some_bytes) > 1 else b'' + + # Yield until we get the second header's byte + while not some_bytes: + some_bytes = (yield 1) + + second_byte = some_bytes[0] if isinstance(some_bytes, bytearray) else ord(some_bytes[0]) + mask = (second_byte >> 7) & 1 + self.payload_length = second_byte & 0x7f + + # All control frames MUST have a payload length of 125 some_bytes or less + if self.opcode > 0x7 and self.payload_length > 125: + raise FrameTooLargeException() + + if some_bytes and len(some_bytes) > 1: + buf = some_bytes[1:] + some_bytes = buf + else: + buf = b'' + some_bytes = b'' + + if self.payload_length == 127: + # This will compute the actual application data size + if len(buf) < 8: + nxt_buf_size = 8 - len(buf) + some_bytes = (yield nxt_buf_size) + some_bytes = buf + (some_bytes or b'') + while len(some_bytes) < 8: + b = (yield 8 - len(some_bytes)) + if b is not None: + some_bytes = some_bytes + b + if len(some_bytes) > 8: + buf = some_bytes[8:] + some_bytes = some_bytes[:8] + else: + some_bytes = buf[:8] + buf = buf[8:] + extended_payload_length = some_bytes + self.payload_length = unpack( + '!Q', extended_payload_length)[0] + if self.payload_length > 0x7FFFFFFFFFFFFFFF: + raise FrameTooLargeException() + elif self.payload_length == 126: + if len(buf) < 2: + nxt_buf_size = 2 - len(buf) + some_bytes = (yield nxt_buf_size) + some_bytes = buf + (some_bytes or b'') + while len(some_bytes) < 2: + b = (yield 2 - len(some_bytes)) + if b is not None: + some_bytes = some_bytes + b + if len(some_bytes) > 2: + buf = some_bytes[2:] + some_bytes = some_bytes[:2] + else: + some_bytes = buf[:2] + buf = buf[2:] + extended_payload_length = some_bytes + self.payload_length = unpack( + '!H', extended_payload_length)[0] + + if mask: + if len(buf) < 4: + nxt_buf_size = 4 - len(buf) + some_bytes = (yield nxt_buf_size) + some_bytes = buf + (some_bytes or b'') + while not some_bytes or len(some_bytes) < 4: + b = (yield 4 - len(some_bytes)) + if b is not None: + some_bytes = some_bytes + b + if len(some_bytes) > 4: + buf = some_bytes[4:] + else: + some_bytes = buf[:4] + buf = buf[4:] + self.masking_key = some_bytes + + if len(buf) < self.payload_length: + nxt_buf_size = self.payload_length - len(buf) + some_bytes = (yield nxt_buf_size) + some_bytes = buf + (some_bytes or b'') + while len(some_bytes) < self.payload_length: + l = self.payload_length - len(some_bytes) + b = (yield l) + if b is not None: + some_bytes = some_bytes + b + else: + if self.payload_length == len(buf): + some_bytes = buf + else: + some_bytes = buf[:self.payload_length] + + self.body = some_bytes + yield + + def mask(self, data): + """ + Performs the masking or unmasking operation on data + using the simple masking algorithm: + + .. + j = i MOD 4 + transformed-octet-i = original-octet-i XOR masking-key-octet-j + + """ + masked = bytearray(data) + if py3k: key = self.masking_key + else: key = map(ord, self.masking_key) + for i in range(len(data)): + masked[i] = masked[i] ^ key[i%4] + return masked + unmask = mask diff --git a/JUNK/WebSocket-for-Python-master/ws4py/manager.py b/JUNK/WebSocket-for-Python-master/ws4py/manager.py new file mode 100644 index 0000000..20c215f --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/manager.py @@ -0,0 +1,368 @@ +# -*- coding: utf-8 -*- +__doc__ = """ +The manager module provides a selected classes to +handle websocket's execution. + +Initially the rationale was to: + +- Externalize the way the CherryPy server had been setup + as its websocket management was too tightly coupled with + the plugin implementation. +- Offer a management that could be used by other + server or client implementations. +- Move away from the threaded model to the event-based + model by relying on `select` or `epoll` (when available). + + +A simple usage for handling websocket clients: + +.. code-block:: python + + from ws4py.client import WebSocketBaseClient + from ws4py.manager import WebSocketManager + + m = WebSocketManager() + + class EchoClient(WebSocketBaseClient): + def handshake_ok(self): + m.add(self) # register the client once the handshake is done + + def received_message(self, msg): + print str(msg) + + m.start() + + client = EchoClient('ws://localhost:9000/ws') + client.connect() + + m.join() # blocks forever + +Managers are not compulsory but hopefully will help your +workflow. For clients, you can still rely on threaded, gevent or +tornado based implementations of course. +""" +import logging +import select +import threading +import time + +from ws4py import format_addresses +from ws4py.compat import py3k + +logger = logging.getLogger('ws4py') + +class SelectPoller(object): + def __init__(self, timeout=0.1): + """ + A socket poller that uses the `select` + implementation to determines which + file descriptors have data available to read. + + It is available on all platforms. + """ + self._fds = [] + self.timeout = timeout + + def release(self): + """ + Cleanup resources. + """ + self._fds = [] + + def register(self, fd): + """ + Register a new file descriptor to be + part of the select polling next time around. + """ + if fd not in self._fds: + self._fds.append(fd) + + def unregister(self, fd): + """ + Unregister the given file descriptor. + """ + if fd in self._fds: + self._fds.remove(fd) + + def poll(self): + """ + Polls once and returns a list of + ready-to-be-read file descriptors. + """ + if not self._fds: + time.sleep(self.timeout) + return [] + try: + r, w, x = select.select(self._fds, [], [], self.timeout) + except IOError as e: + return [] + return r + +class EPollPoller(object): + def __init__(self, timeout=0.1): + """ + An epoll poller that uses the ``epoll`` + implementation to determines which + file descriptors have data available to read. + + Available on Unix flavors mostly. + """ + self.poller = select.epoll() + self.timeout = timeout + + def release(self): + """ + Cleanup resources. + """ + self.poller.close() + + def register(self, fd): + """ + Register a new file descriptor to be + part of the select polling next time around. + """ + try: + self.poller.register(fd, select.EPOLLIN | select.EPOLLPRI) + except IOError: + pass + + def unregister(self, fd): + """ + Unregister the given file descriptor. + """ + self.poller.unregister(fd) + + def poll(self): + """ + Polls once and yields each ready-to-be-read + file-descriptor + """ + try: + events = self.poller.poll(timeout=self.timeout) + except IOError: + events = [] + + for fd, event in events: + if event | select.EPOLLIN | select.EPOLLPRI: + yield fd + +class KQueuePoller(object): + def __init__(self, timeout=0.1): + """ + An epoll poller that uses the ``epoll`` + implementation to determines which + file descriptors have data available to read. + + Available on Unix flavors mostly. + """ + self.poller = select.epoll() + self.timeout = timeout + + def release(self): + """ + Cleanup resources. + """ + self.poller.close() + + def register(self, fd): + """ + Register a new file descriptor to be + part of the select polling next time around. + """ + try: + self.poller.register(fd, select.EPOLLIN | select.EPOLLPRI) + except IOError: + pass + + def unregister(self, fd): + """ + Unregister the given file descriptor. + """ + self.poller.unregister(fd) + + def poll(self): + """ + Polls once and yields each ready-to-be-read + file-descriptor + """ + try: + events = self.poller.poll(timeout=self.timeout) + except IOError: + events = [] + for fd, event in events: + if event | select.EPOLLIN | select.EPOLLPRI: + yield fd + +class WebSocketManager(threading.Thread): + def __init__(self, poller=None): + """ + An event-based websocket manager. By event-based, we mean + that the websockets will be called when their + sockets have data to be read from. + + The manager itself runs in its own thread as not to + be the blocking mainloop of your application. + + The poller's implementation is automatically chosen + with ``epoll`` if available else ``select`` unless you + provide your own ``poller``. + """ + threading.Thread.__init__(self) + self.name = "WebSocketManager" + self.lock = threading.Lock() + self.websockets = {} + self.running = False + + if poller: + self.poller = poller + else: + if hasattr(select, "epoll"): + self.poller = EPollPoller() + logger.info("Using epoll") + else: + self.poller = SelectPoller() + logger.info("Using select as epoll is not available") + + def __len__(self): + return len(self.websockets) + + def __iter__(self): + if py3k: + return iter(self.websockets.values()) + else: + return self.websockets.itervalues() + + def __contains__(self, ws): + fd = ws.sock.fileno() + # just in case the file descriptor was reused + # we actually check the instance (well, this might + # also have been reused...) + return self.websockets.get(fd) is ws + + def add(self, websocket): + """ + Manage a new websocket. + + First calls its :meth:`opened() ` + method and register its socket against the poller + for reading events. + """ + if websocket in self: + return + + logger.info("Managing websocket %s" % format_addresses(websocket)) + websocket.opened() + with self.lock: + fd = websocket.sock.fileno() + self.websockets[fd] = websocket + self.poller.register(fd) + + def remove(self, websocket): + """ + Remove the given ``websocket`` from the manager. + + This does not call its :meth:`closed() ` + method as it's out-of-band by your application + or from within the manager's run loop. + """ + if websocket not in self: + return + + logger.info("Removing websocket %s" % format_addresses(websocket)) + with self.lock: + fd = websocket.sock.fileno() + self.websockets.pop(fd, None) + self.poller.unregister(fd) + + def stop(self): + """ + Mark the manager as terminated and + releases its resources. + """ + self.running = False + with self.lock: + self.websockets.clear() + self.poller.release() + + def run(self): + """ + Manager's mainloop executed from within a thread. + + Constantly poll for read events and, when available, + call related websockets' `once` method to + read and process the incoming data. + + If the :meth:`once() ` + method returns a `False` value, its :meth:`terminate() ` + method is also applied to properly close + the websocket and its socket is unregistered from the poller. + + Note that websocket shouldn't take long to process + their data or they will block the remaining + websockets with data to be handled. As for what long means, + it's up to your requirements. + """ + self.running = True + while self.running: + with self.lock: + polled = self.poller.poll() + if not self.running: + break + + for fd in polled: + if not self.running: + break + + ws = self.websockets.get(fd) + if ws and not ws.terminated: + # I don't know what kind of errors might spew out of here + # but they probably shouldn't crash the entire server. + try: + x = ws.once() + # Treat the error as if once() had returned None + except Exception as e: + x = None + logger.error("Terminating websocket %s due to exception: %s in once method" % (format_addresses(ws), repr(e)) ) + if not x: + with self.lock: + self.websockets.pop(fd, None) + self.poller.unregister(fd) + + if not ws.terminated: + logger.info("Terminating websocket %s" % format_addresses(ws)) + ws.terminate() + + + def close_all(self, code=1001, message='Server is shutting down'): + """ + Execute the :meth:`close() ` + method of each registered websockets to initiate the closing handshake. + It doesn't wait for the handshake to complete properly. + """ + with self.lock: + logger.info("Closing all websockets with [%d] '%s'" % (code, message)) + for ws in iter(self): + ws.close(code=code, reason=message) + + def broadcast(self, message, binary=False): + """ + Broadcasts the given message to all registered + websockets, at the time of the call. + + Broadcast may fail on a given registered peer + but this is silent as it's not the method's + purpose to handle websocket's failures. + """ + with self.lock: + websockets = self.websockets.copy() + if py3k: + ws_iter = iter(websockets.values()) + else: + ws_iter = websockets.itervalues() + + for ws in ws_iter: + if not ws.terminated: + try: + ws.send(message, binary) + except: + pass diff --git a/JUNK/WebSocket-for-Python-master/ws4py/messaging.py b/JUNK/WebSocket-for-Python-master/ws4py/messaging.py new file mode 100644 index 0000000..f9b0e77 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/messaging.py @@ -0,0 +1,169 @@ +# -*- coding: utf-8 -*- +import os +import struct + +from ws4py.framing import Frame, OPCODE_CONTINUATION, OPCODE_TEXT, \ + OPCODE_BINARY, OPCODE_CLOSE, OPCODE_PING, OPCODE_PONG +from ws4py.compat import unicode, py3k + +__all__ = ['Message', 'TextMessage', 'BinaryMessage', 'CloseControlMessage', + 'PingControlMessage', 'PongControlMessage'] + +class Message(object): + def __init__(self, opcode, data=b'', encoding='utf-8'): + """ + A message is a application level entity. It's usually built + from one or many frames. The protocol defines several kind + of messages which are grouped into two sets: + + * data messages which can be text or binary typed + * control messages which provide a mechanism to perform + in-band control communication between peers + + The ``opcode`` indicates the message type and ``data`` is + the possible message payload. + + The payload is held internally as a a :func:`bytearray` as they are + faster than pure strings for append operations. + + Unicode data will be encoded using the provided ``encoding``. + """ + self.opcode = opcode + self._completed = False + self.encoding = encoding + + if isinstance(data, unicode): + if not encoding: + raise TypeError("unicode data without an encoding") + data = data.encode(encoding) + elif isinstance(data, bytearray): + data = bytes(data) + elif not isinstance(data, bytes): + raise TypeError("%s is not a supported data type" % type(data)) + + self.data = data + + def single(self, mask=False): + """ + Returns a frame bytes with the fin bit set and a random mask. + + If ``mask`` is set, automatically mask the frame + using a generated 4-byte token. + """ + mask = os.urandom(4) if mask else None + return Frame(body=self.data, opcode=self.opcode, + masking_key=mask, fin=1).build() + + def fragment(self, first=False, last=False, mask=False): + """ + Returns a :class:`ws4py.framing.Frame` bytes. + + The behavior depends on the given flags: + + * ``first``: the frame uses ``self.opcode`` else a continuation opcode + * ``last``: the frame has its ``fin`` bit set + * ``mask``: the frame is masked using a automatically generated 4-byte token + """ + fin = 1 if last is True else 0 + opcode = self.opcode if first is True else OPCODE_CONTINUATION + mask = os.urandom(4) if mask else None + return Frame(body=self.data, + opcode=opcode, masking_key=mask, + fin=fin).build() + + @property + def completed(self): + """ + Indicates the the message is complete, meaning + the frame's ``fin`` bit was set. + """ + return self._completed + + @completed.setter + def completed(self, state): + """ + Sets the state for this message. Usually + set by the stream's parser. + """ + self._completed = state + + def extend(self, data): + """ + Add more ``data`` to the message. + """ + if isinstance(data, bytes): + self.data += data + elif isinstance(data, bytearray): + self.data += bytes(data) + elif isinstance(data, unicode): + self.data += data.encode(self.encoding) + else: + raise TypeError("%s is not a supported data type" % type(data)) + + def __len__(self): + return len(self.__unicode__()) + + def __str__(self): + if py3k: + return self.data.decode(self.encoding) + return self.data + + def __unicode__(self): + return self.data.decode(self.encoding) + +class TextMessage(Message): + def __init__(self, text=None): + Message.__init__(self, OPCODE_TEXT, text) + + @property + def is_binary(self): + return False + + @property + def is_text(self): + return True + +class BinaryMessage(Message): + def __init__(self, bytes=None): + Message.__init__(self, OPCODE_BINARY, bytes, encoding=None) + + @property + def is_binary(self): + return True + + @property + def is_text(self): + return False + + def __len__(self): + return len(self.data) + +class CloseControlMessage(Message): + def __init__(self, code=1000, reason=''): + data = b"" + if code: + data += struct.pack("!H", code) + if reason is not None: + if isinstance(reason, unicode): + reason = reason.encode('utf-8') + data += reason + + Message.__init__(self, OPCODE_CLOSE, data, 'utf-8') + self.code = code + self.reason = reason + + def __str__(self): + if py3k: + return self.reason.decode('utf-8') + return self.reason + + def __unicode__(self): + return self.reason.decode(self.encoding) + +class PingControlMessage(Message): + def __init__(self, data=None): + Message.__init__(self, OPCODE_PING, data) + +class PongControlMessage(Message): + def __init__(self, data): + Message.__init__(self, OPCODE_PONG, data) diff --git a/JUNK/WebSocket-for-Python-master/ws4py/server/__init__.py b/JUNK/WebSocket-for-Python-master/ws4py/server/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/JUNK/WebSocket-for-Python-master/ws4py/server/cherrypyserver.py b/JUNK/WebSocket-for-Python-master/ws4py/server/cherrypyserver.py new file mode 100644 index 0000000..34ff42e --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/server/cherrypyserver.py @@ -0,0 +1,382 @@ +# -*- coding: utf-8 -*- +__doc__ = """ +WebSocket within CherryPy is a tricky bit since CherryPy is +a threaded server which would choke quickly if each thread +of the server were kept attached to a long living connection +that WebSocket expects. + +In order to work around this constraint, we take some advantage +of some internals of CherryPy as well as the introspection +Python provides. + +Basically, when the WebSocket handshake is complete, we take over +the socket and let CherryPy take back the thread that was +associated with the upgrade request. + +These operations require a bit of work at various levels of +the CherryPy framework but this module takes care of them +and from your application's perspective, this is abstracted. + +Here are the various utilities provided by this module: + + * WebSocketTool: The tool is in charge to perform the + HTTP upgrade and detach the socket from + CherryPy. It runs at various hook points of the + request's processing. Enable that tool at + any path you wish to handle as a WebSocket + handler. + + * WebSocketPlugin: The plugin tracks the instanciated web socket handlers. + It also cleans out websocket handler which connection + have been closed down. The websocket connection then + runs in its own thread that this plugin manages. + +Simple usage example: + +.. code-block:: python + :linenos: + + import cherrypy + from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool + from ws4py.websocket import EchoWebSocket + + cherrypy.config.update({'server.socket_port': 9000}) + WebSocketPlugin(cherrypy.engine).subscribe() + cherrypy.tools.websocket = WebSocketTool() + + class Root(object): + @cherrypy.expose + def index(self): + return 'some HTML with a websocket javascript connection' + + @cherrypy.expose + def ws(self): + pass + + cherrypy.quickstart(Root(), '/', config={'/ws': {'tools.websocket.on': True, + 'tools.websocket.handler_cls': EchoWebSocket}}) + + +Note that you can set the handler class on per-path basis, +meaning you could also dynamically change the class based +on other envrionmental settings (is the user authenticated for ex). +""" +import base64 +from hashlib import sha1 +import inspect +import threading + +import cherrypy +from cherrypy import Tool +from cherrypy.process import plugins +try: + from cheroot.server import HTTPConnection, HTTPRequest, KnownLengthRFile +except ImportError: + from cherrypy.wsgiserver import HTTPConnection, HTTPRequest, KnownLengthRFile + +from ws4py import WS_KEY, WS_VERSION +from ws4py.exc import HandshakeError +from ws4py.websocket import WebSocket +from ws4py.compat import py3k, get_connection, detach_connection +from ws4py.manager import WebSocketManager + +__all__ = ['WebSocketTool', 'WebSocketPlugin'] + +class WebSocketTool(Tool): + def __init__(self): + Tool.__init__(self, 'before_request_body', self.upgrade) + + def _setup(self): + conf = self._merged_args() + hooks = cherrypy.serving.request.hooks + p = conf.pop("priority", getattr(self.callable, "priority", + self._priority)) + hooks.attach(self._point, self.callable, priority=p, **conf) + hooks.attach('before_finalize', self.complete, + priority=p) + hooks.attach('on_end_resource', self.cleanup_headers, + priority=70) + hooks.attach('on_end_request', self.start_handler, + priority=70) + + def upgrade(self, protocols=None, extensions=None, version=WS_VERSION, + handler_cls=WebSocket, heartbeat_freq=None): + """ + Performs the upgrade of the connection to the WebSocket + protocol. + + The provided protocols may be a list of WebSocket + protocols supported by the instance of the tool. + + When no list is provided and no protocol is either + during the upgrade, then the protocol parameter is + not taken into account. On the other hand, + if the protocol from the handshake isn't part + of the provided list, the upgrade fails immediatly. + """ + request = cherrypy.serving.request + request.process_request_body = False + + ws_protocols = None + ws_location = None + ws_version = version + ws_key = None + ws_extensions = [] + + if request.method != 'GET': + raise HandshakeError('HTTP method must be a GET') + + for key, expected_value in [('Upgrade', 'websocket'), + ('Connection', 'upgrade')]: + actual_value = request.headers.get(key, '').lower() + if not actual_value: + raise HandshakeError('Header %s is not defined' % key) + if expected_value not in actual_value: + raise HandshakeError('Illegal value for header %s: %s' % + (key, actual_value)) + + version = request.headers.get('Sec-WebSocket-Version') + supported_versions = ', '.join([str(v) for v in ws_version]) + version_is_valid = False + if version: + try: version = int(version) + except: pass + else: version_is_valid = version in ws_version + + if not version_is_valid: + cherrypy.response.headers['Sec-WebSocket-Version'] = supported_versions + raise HandshakeError('Unhandled or missing WebSocket version') + + key = request.headers.get('Sec-WebSocket-Key') + if key: + ws_key = base64.b64decode(key.encode('utf-8')) + if len(ws_key) != 16: + raise HandshakeError("WebSocket key's length is invalid") + + protocols = protocols or [] + subprotocols = request.headers.get('Sec-WebSocket-Protocol') + if subprotocols: + ws_protocols = [] + for s in subprotocols.split(','): + s = s.strip() + if s in protocols: + ws_protocols.append(s) + + exts = extensions or [] + extensions = request.headers.get('Sec-WebSocket-Extensions') + if extensions: + for ext in extensions.split(','): + ext = ext.strip() + if ext in exts: + ws_extensions.append(ext) + + location = [] + include_port = False + if request.scheme == "https": + location.append("wss://") + include_port = request.local.port != 443 + else: + location.append("ws://") + include_port = request.local.port != 80 + location.append('localhost') + if include_port: + location.append(":%d" % request.local.port) + location.append(request.path_info) + if request.query_string != "": + location.append("?%s" % request.query_string) + ws_location = ''.join(location) + + response = cherrypy.serving.response + response.stream = True + response.status = '101 Switching Protocols' + response.headers['Content-Type'] = 'text/plain' + response.headers['Upgrade'] = 'websocket' + response.headers['Connection'] = 'Upgrade' + response.headers['Sec-WebSocket-Version'] = str(version) + response.headers['Sec-WebSocket-Accept'] = base64.b64encode(sha1(key.encode('utf-8') + WS_KEY).digest()) + if ws_protocols: + response.headers['Sec-WebSocket-Protocol'] = ', '.join(ws_protocols) + if ws_extensions: + response.headers['Sec-WebSocket-Extensions'] = ','.join(ws_extensions) + + addr = (request.remote.ip, request.remote.port) + rfile = request.rfile.rfile + if isinstance(rfile, KnownLengthRFile): + rfile = rfile.rfile + + ws_conn = get_connection(rfile) + request.ws_handler = handler_cls(ws_conn, ws_protocols, ws_extensions, + request.wsgi_environ.copy(), + heartbeat_freq=heartbeat_freq) + + def complete(self): + """ + Sets some internal flags of CherryPy so that it + doesn't close the socket down. + """ + self._set_internal_flags() + + def cleanup_headers(self): + """ + Some clients aren't that smart when it comes to + headers lookup. + """ + response = cherrypy.response + if not response.header_list: + return + + headers = response.header_list[:] + for (k, v) in headers: + if k[:7] == 'Sec-Web': + response.header_list.remove((k, v)) + response.header_list.append((k.replace('Sec-Websocket', 'Sec-WebSocket'), v)) + + def start_handler(self): + """ + Runs at the end of the request processing by calling + the opened method of the handler. + """ + request = cherrypy.request + if not hasattr(request, 'ws_handler'): + return + + addr = (request.remote.ip, request.remote.port) + ws_handler = request.ws_handler + request.ws_handler = None + delattr(request, 'ws_handler') + + # By doing this we detach the socket from + # the CherryPy stack avoiding memory leaks + detach_connection(request.rfile.rfile) + + cherrypy.engine.publish('handle-websocket', ws_handler, addr) + + def _set_internal_flags(self): + """ + CherryPy has two internal flags that we are interested in + to enable WebSocket within the server. They can't be set via + a public API and considering I'd want to make this extension + as compatible as possible whilst refraining in exposing more + than should be within CherryPy, I prefer performing a bit + of introspection to set those flags. Even by Python standards + such introspection isn't the cleanest but it works well + enough in this case. + + This also means that we do that only on WebSocket + connections rather than globally and therefore we do not + harm the rest of the HTTP server. + """ + current = inspect.currentframe() + while True: + if not current: + break + _locals = current.f_locals + if 'self' in _locals: + if type(_locals['self']) == HTTPRequest: + _locals['self'].close_connection = True + if type(_locals['self']) == HTTPConnection: + _locals['self'].linger = True + # HTTPConnection is more inner than + # HTTPRequest so we can leave once + # we're done here + return + _locals = None + current = current.f_back + +class WebSocketPlugin(plugins.SimplePlugin): + def __init__(self, bus): + plugins.SimplePlugin.__init__(self, bus) + self.manager = WebSocketManager() + + def start(self): + self.bus.log("Starting WebSocket processing") + self.bus.subscribe('stop', self.cleanup) + self.bus.subscribe('handle-websocket', self.handle) + self.bus.subscribe('websocket-broadcast', self.broadcast) + self.manager.start() + + def stop(self): + self.bus.log("Terminating WebSocket processing") + self.bus.unsubscribe('stop', self.cleanup) + self.bus.unsubscribe('handle-websocket', self.handle) + self.bus.unsubscribe('websocket-broadcast', self.broadcast) + + def handle(self, ws_handler, peer_addr): + """ + Tracks the provided handler. + + :param ws_handler: websocket handler instance + :param peer_addr: remote peer address for tracing purpose + """ + self.manager.add(ws_handler) + + def cleanup(self): + """ + Terminate all connections and clear the pool. Executed when the engine stops. + """ + self.manager.close_all() + self.manager.stop() + self.manager.join() + + def broadcast(self, message, binary=False): + """ + Broadcasts a message to all connected clients known to + the server. + + :param message: a message suitable to pass to the send() method + of the connected handler. + :param binary: whether or not the message is a binary one + """ + self.manager.broadcast(message, binary) + +if __name__ == '__main__': + import random + cherrypy.config.update({'server.socket_host': '127.0.0.1', + 'server.socket_port': 9000}) + WebSocketPlugin(cherrypy.engine).subscribe() + cherrypy.tools.websocket = WebSocketTool() + + class Root(object): + @cherrypy.expose + @cherrypy.tools.websocket(on=False) + def ws(self): + return """ + + + + + +
+ +
+ + +
+ + + """ % {'username': "User%d" % random.randint(0, 100)} + + @cherrypy.expose + def index(self): + cherrypy.log("Handler created: %s" % repr(cherrypy.request.ws_handler)) + + cherrypy.quickstart(Root(), '/', config={'/': {'tools.websocket.on': True, + 'tools.websocket.handler_cls': EchoWebSocketHandler}}) diff --git a/JUNK/WebSocket-for-Python-master/ws4py/server/geventserver.py b/JUNK/WebSocket-for-Python-master/ws4py/server/geventserver.py new file mode 100644 index 0000000..d6adb41 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/server/geventserver.py @@ -0,0 +1,121 @@ +# -*- coding: utf-8 -*- +__doc__ = """ +WSGI entities to support WebSocket from within gevent. + +Its usage is rather simple: + +.. code-block: python + + from gevent import monkey; monkey.patch_all() + from ws4py.websocket import EchoWebSocket + from ws4py.server.geventserver import WSGIServer + from ws4py.server.wsgiutils import WebSocketWSGIApplication + + server = WSGIServer(('localhost', 9000), WebSocketWSGIApplication(handler_cls=EchoWebSocket)) + server.serve_forever() + +""" +import logging + +import gevent +from gevent.pywsgi import WSGIHandler, WSGIServer as _WSGIServer +from gevent.pool import Pool + +from ws4py import format_addresses +from ws4py.server.wsgiutils import WebSocketWSGIApplication + + +logger = logging.getLogger('ws4py') + +__all__ = ['WebSocketWSGIHandler', 'WSGIServer', + 'GEventWebSocketPool'] + + +class WebSocketWSGIHandler(WSGIHandler): + """ + A WSGI handler that will perform the :rfc:`6455` + upgrade and handshake before calling the WSGI application. + + If the incoming request doesn't have a `'Upgrade'` header, + the handler will simply fallback to the gevent builtin's handler + and process it as per usual. + """ + + def run_application(self): + upgrade_header = self.environ.get('HTTP_UPGRADE', '').lower() + if upgrade_header: + # Build and start the HTTP response + self.environ['ws4py.socket'] = self.socket or self.environ['wsgi.input'].rfile._sock + self.result = self.application(self.environ, self.start_response) or [] + self.process_result() + del self.environ['ws4py.socket'] + self.socket = None + self.rfile.close() + + ws = self.environ.pop('ws4py.websocket', None) + if ws: + ws_greenlet = self.server.pool.track(ws) + # issue #170 + # in gevent 1.1 socket will be closed once application returns + # so let's wait for websocket handler to finish + ws_greenlet.join() + else: + gevent.pywsgi.WSGIHandler.run_application(self) + + +class GEventWebSocketPool(Pool): + """ + Simple pool of bound websockets. + Internally it uses a gevent group to track + the websockets. The server should call the ``clear`` + method to initiate the closing handshake when the + server is shutdown. + """ + + def track(self, websocket): + logger.info("Managing websocket %s" % format_addresses(websocket)) + return self.spawn(websocket.run) + + def clear(self): + logger.info("Terminating server and all connected websockets") + for greenlet in self: + try: + websocket = greenlet._run.im_self + if websocket: + websocket.close(1001, 'Server is shutting down') + except: + pass + finally: + self.discard(greenlet) + + +class WSGIServer(_WSGIServer): + handler_class = WebSocketWSGIHandler + + def __init__(self, *args, **kwargs): + """ + WSGI server that simply tracks websockets + and send them a proper closing handshake + when the server terminates. + + Other than that, the server is the same + as its :class:`gevent.pywsgi.WSGIServer` + base. + """ + _WSGIServer.__init__(self, *args, **kwargs) + self.pool = GEventWebSocketPool() + + def stop(self, *args, **kwargs): + self.pool.clear() + _WSGIServer.stop(self, *args, **kwargs) + + +if __name__ == '__main__': + + from ws4py import configure_logger + configure_logger() + + from ws4py.websocket import EchoWebSocket + server = WSGIServer(('127.0.0.1', 9000), + WebSocketWSGIApplication(handler_cls=EchoWebSocket)) + server.serve_forever() diff --git a/JUNK/WebSocket-for-Python-master/ws4py/server/tulipserver.py b/JUNK/WebSocket-for-Python-master/ws4py/server/tulipserver.py new file mode 100644 index 0000000..2786c16 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/server/tulipserver.py @@ -0,0 +1,224 @@ +# -*- coding: utf-8 -*- +import base64 +from hashlib import sha1 +from email.parser import BytesHeaderParser +import io + +import asyncio + +from ws4py import WS_KEY, WS_VERSION +from ws4py.exc import HandshakeError +from ws4py.websocket import WebSocket + +LF = b'\n' +CRLF = b'\r\n' +SPACE = b' ' +EMPTY = b'' + +__all__ = ['WebSocketProtocol'] + +class WebSocketProtocol(asyncio.StreamReaderProtocol): + def __init__(self, handler_cls): + asyncio.StreamReaderProtocol.__init__(self, asyncio.StreamReader(), + self._pseudo_connected) + self.ws = handler_cls(self) + + def _pseudo_connected(self, reader, writer): + pass + + def connection_made(self, transport): + """ + A peer is now connected and we receive an instance + of the underlying :class:`asyncio.Transport`. + + We :class:`asyncio.StreamReader` is created + and the transport is associated before the + initial HTTP handshake is undertaken. + """ + #self.transport = transport + #self.stream = asyncio.StreamReader() + #self.stream.set_transport(transport) + asyncio.StreamReaderProtocol.connection_made(self, transport) + # Let make it concurrent for others to tag along + f = asyncio.async(self.handle_initial_handshake()) + f.add_done_callback(self.terminated) + + @property + def writer(self): + return self._stream_writer + + @property + def reader(self): + return self._stream_reader + + def terminated(self, f): + if f.done() and not f.cancelled(): + ex = f.exception() + if ex: + response = [b'HTTP/1.0 400 Bad Request'] + response.append(b'Content-Length: 0') + response.append(b'Connection: close') + response.append(b'') + response.append(b'') + self.writer.write(CRLF.join(response)) + self.ws.close_connection() + + def close(self): + """ + Initiate the websocket closing handshake + which will eventuall lead to the underlying + transport. + """ + self.ws.close() + + def timeout(self): + self.ws.close_connection() + if self.ws.started: + self.ws.closed(1002, "Peer connection timed-out") + + def connection_lost(self, exc): + """ + The peer connection is now, the closing + handshake won't work so let's not even try. + However let's make the websocket handler + be aware of it by calling its `closed` + method. + """ + if exc is not None: + self.ws.close_connection() + if self.ws.started: + self.ws.closed(1002, "Peer connection was lost") + + @asyncio.coroutine + def handle_initial_handshake(self): + """ + Performs the HTTP handshake described in :rfc:`6455`. Note that + this implementation is really basic and it is strongly advised + against using it in production. It would probably break for + most clients. If you want a better support for HTTP, please + use a more reliable HTTP server implemented using asyncio. + """ + request_line = yield from self.next_line() + method, uri, req_protocol = request_line.strip().split(SPACE, 2) + + # GET required + if method.upper() != b'GET': + raise HandshakeError('HTTP method must be a GET') + + headers = yield from self.read_headers() + if req_protocol == b'HTTP/1.1' and 'Host' not in headers: + raise ValueError("Missing host header") + + for key, expected_value in [('Upgrade', 'websocket'), + ('Connection', 'upgrade')]: + actual_value = headers.get(key, '').lower() + if not actual_value: + raise HandshakeError('Header %s is not defined' % str(key)) + if expected_value not in actual_value: + raise HandshakeError('Illegal value for header %s: %s' % + (key, actual_value)) + + response_headers = {} + + ws_version = WS_VERSION + version = headers.get('Sec-WebSocket-Version') + supported_versions = ', '.join([str(v) for v in ws_version]) + version_is_valid = False + if version: + try: version = int(version) + except: pass + else: version_is_valid = version in ws_version + + if not version_is_valid: + response_headers['Sec-WebSocket-Version'] = supported_versions + raise HandshakeError('Unhandled or missing WebSocket version') + + key = headers.get('Sec-WebSocket-Key') + if key: + ws_key = base64.b64decode(key.encode('utf-8')) + if len(ws_key) != 16: + raise HandshakeError("WebSocket key's length is invalid") + + protocols = [] + ws_protocols = [] + subprotocols = headers.get('Sec-WebSocket-Protocol') + if subprotocols: + for s in subprotocols.split(','): + s = s.strip() + if s in protocols: + ws_protocols.append(s) + + exts = [] + ws_extensions = [] + extensions = headers.get('Sec-WebSocket-Extensions') + if extensions: + for ext in extensions.split(','): + ext = ext.strip() + if ext in exts: + ws_extensions.append(ext) + + self.ws.protocols = ws_protocols + self.ws.extensions = ws_extensions + self.ws.headers = headers + + response = [req_protocol + b' 101 Switching Protocols'] + response.append(b'Upgrade: websocket') + response.append(b'Content-Type: text/plain') + response.append(b'Content-Length: 0') + response.append(b'Connection: Upgrade') + response.append(b'Sec-WebSocket-Version:' + bytes(str(version), 'utf-8')) + response.append(b'Sec-WebSocket-Accept:' + base64.b64encode(sha1(key.encode('utf-8') + WS_KEY).digest())) + if ws_protocols: + response.append(b'Sec-WebSocket-Protocol:' + b', '.join(ws_protocols)) + if ws_extensions: + response.append(b'Sec-WebSocket-Extensions:' + b','.join(ws_extensions)) + response.append(b'') + response.append(b'') + self.writer.write(CRLF.join(response)) + yield from self.handle_websocket() + + @asyncio.coroutine + def handle_websocket(self): + """ + Starts the websocket process until the + exchange is completed and terminated. + """ + yield from self.ws.run() + + @asyncio.coroutine + def read_headers(self): + """ + Read all HTTP headers from the HTTP request + and returns a dictionary of them. + """ + headers = b'' + while True: + line = yield from self.next_line() + headers += line + if line == CRLF: + break + return BytesHeaderParser().parsebytes(headers) + + @asyncio.coroutine + def next_line(self): + """ + Reads data until \r\n is met and then return all read + bytes. + """ + line = yield from self.reader.readline() + if not line.endswith(CRLF): + raise ValueError("Missing mandatory trailing CRLF") + return line + +if __name__ == '__main__': + from ws4py.async_websocket import EchoWebSocket + + loop = asyncio.get_event_loop() + + def start_server(): + proto_factory = lambda: WebSocketProtocol(EchoWebSocket) + return loop.create_server(proto_factory, '', 9007) + + s = loop.run_until_complete(start_server()) + print('serving on', s.sockets[0].getsockname()) + loop.run_forever() diff --git a/JUNK/WebSocket-for-Python-master/ws4py/server/wsgirefserver.py b/JUNK/WebSocket-for-Python-master/ws4py/server/wsgirefserver.py new file mode 100644 index 0000000..d4a9d9a --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/server/wsgirefserver.py @@ -0,0 +1,157 @@ +# -*- coding: utf-8 -*- +__doc__ = """ +Add WebSocket support to the built-in WSGI server +provided by the :py:mod:`wsgiref`. This is clearly not +meant to be a production server so please consider this +only for testing purpose. + +Mostly, this module overrides bits and pieces of +the built-in classes so that it supports the WebSocket +workflow. + +.. code-block:: python + + from wsgiref.simple_server import make_server + from ws4py.websocket import EchoWebSocket + from ws4py.server.wsgirefserver import WSGIServer, WebSocketWSGIRequestHandler + from ws4py.server.wsgiutils import WebSocketWSGIApplication + + server = make_server('', 9000, server_class=WSGIServer, + handler_class=WebSocketWSGIRequestHandler, + app=WebSocketWSGIApplication(handler_cls=EchoWebSocket)) + server.initialize_websockets_manager() + server.serve_forever() + +.. note:: + For some reason this server may fail against autobahntestsuite. +""" +import logging +import sys +import itertools +import operator +from wsgiref.handlers import SimpleHandler +from wsgiref.simple_server import WSGIRequestHandler, WSGIServer as _WSGIServer +from wsgiref import util + +util._hoppish = {}.__contains__ + +from ws4py.manager import WebSocketManager +from ws4py import format_addresses +from ws4py.server.wsgiutils import WebSocketWSGIApplication +from ws4py.compat import get_connection + +__all__ = ['WebSocketWSGIHandler', 'WebSocketWSGIRequestHandler', + 'WSGIServer'] + +logger = logging.getLogger('ws4py') + +class WebSocketWSGIHandler(SimpleHandler): + def setup_environ(self): + """ + Setup the environ dictionary and add the + `'ws4py.socket'` key. Its associated value + is the real socket underlying socket. + """ + SimpleHandler.setup_environ(self) + self.environ['ws4py.socket'] = get_connection(self.environ['wsgi.input']) + self.http_version = self.environ['SERVER_PROTOCOL'].rsplit('/')[-1] + + def finish_response(self): + """ + Completes the response and performs the following tasks: + + - Remove the `'ws4py.socket'` and `'ws4py.websocket'` + environ keys. + - Attach the returned websocket, if any, to the WSGI server + using its ``link_websocket_to_server`` method. + """ + # force execution of the result iterator until first actual content + rest = iter(self.result) + first = list(itertools.islice(rest, 1)) + self.result = itertools.chain(first, rest) + + # now it's safe to look if environ was modified + ws = None + if self.environ: + self.environ.pop('ws4py.socket', None) + ws = self.environ.pop('ws4py.websocket', None) + + try: + SimpleHandler.finish_response(self) + except: + if ws: + ws.close(1011, reason='Something broke') + raise + else: + if ws: + self.request_handler.server.link_websocket_to_server(ws) + +class WebSocketWSGIRequestHandler(WSGIRequestHandler): + WebSocketWSGIHandler = WebSocketWSGIHandler + def handle(self): + """ + Unfortunately the base class forces us + to override the whole method to actually provide our wsgi handler. + """ + self.raw_requestline = self.rfile.readline() + if not self.parse_request(): # An error code has been sent, just exit + return + + # next line is where we'd have expect a configuration key somehow + handler = self.WebSocketWSGIHandler( + self.rfile, self.wfile, self.get_stderr(), self.get_environ() + ) + handler.request_handler = self # backpointer for logging + handler.run(self.server.get_app()) + +class WSGIServer(_WSGIServer): + def initialize_websockets_manager(self): + """ + Call thos to start the underlying websockets + manager. Make sure to call it once your server + is created. + """ + self.manager = WebSocketManager() + self.manager.start() + + def shutdown_request(self, request): + """ + The base class would close our socket + if we didn't override it. + """ + pass + + def link_websocket_to_server(self, ws): + """ + Call this from your WSGI handler when a websocket + has been created. + """ + self.manager.add(ws) + + def server_close(self): + """ + Properly initiate closing handshakes on + all websockets when the WSGI server terminates. + """ + if hasattr(self, 'manager'): + self.manager.close_all() + self.manager.stop() + self.manager.join() + delattr(self, 'manager') + _WSGIServer.server_close(self) + +if __name__ == '__main__': + from ws4py import configure_logger + configure_logger() + + from wsgiref.simple_server import make_server + from ws4py.websocket import EchoWebSocket + + server = make_server('', 9000, server_class=WSGIServer, + handler_class=WebSocketWSGIRequestHandler, + app=WebSocketWSGIApplication(handler_cls=EchoWebSocket)) + server.initialize_websockets_manager() + try: + server.serve_forever() + except KeyboardInterrupt: + server.server_close() diff --git a/JUNK/WebSocket-for-Python-master/ws4py/server/wsgiutils.py b/JUNK/WebSocket-for-Python-master/ws4py/server/wsgiutils.py new file mode 100644 index 0000000..efd3242 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/server/wsgiutils.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +__doc__ = """ +This module provides a WSGI application suitable +for a WSGI server such as gevent or wsgiref for instance. + +:pep:`333` couldn't foresee a protocol such as +WebSockets but luckily the way the initial +protocol upgrade was designed means that we can +fit the handshake in a WSGI flow. + +The handshake validates the request against +some internal or user-provided values and +fails the request if the validation doesn't +complete. + +On success, the provided WebSocket subclass +is instanciated and stored into the +`'ws4py.websocket'` environ key so that +the WSGI server can handle it. + +The WSGI application returns an empty iterable +since there is little value to return some +content within the response to the handshake. + +A server wishing to support WebSocket via ws4py +should: + +- Provide the real socket object to ws4py through the + `'ws4py.socket'` environ key. We can't use `'wsgi.input'` + as it may be wrapper to the socket we wouldn't know + how to extract the socket from. +- Look for the `'ws4py.websocket'` key in the environ + when the application has returned and probably attach + it to a :class:`ws4py.manager.WebSocketManager` instance + so that the websocket runs its life. +- Remove the `'ws4py.websocket'` and `'ws4py.socket'` + environ keys once the application has returned. + No need for these keys to persist. +- Not close the underlying socket otherwise, well, + your websocket will also shutdown. + +.. warning:: + + The WSGI application sets the `'Upgrade'` header response + as specified by :rfc:`6455`. This is not tolerated by + :pep:`333` since it's a hop-by-hop header. + We expect most servers won't mind. +""" +import base64 +from hashlib import sha1 +import logging +import sys + +from ws4py.websocket import WebSocket +from ws4py.exc import HandshakeError +from ws4py.compat import unicode, py3k +from ws4py import WS_VERSION, WS_KEY, format_addresses + +logger = logging.getLogger('ws4py') + +__all__ = ['WebSocketWSGIApplication'] + +class WebSocketWSGIApplication(object): + def __init__(self, protocols=None, extensions=None, handler_cls=WebSocket): + """ + WSGI application usable to complete the upgrade handshake + by validating the requested protocols and extensions as + well as the websocket version. + + If the upgrade validates, the `handler_cls` class + is instanciated and stored inside the WSGI `environ` + under the `'ws4py.websocket'` key to make it + available to the WSGI handler. + """ + self.protocols = protocols + self.extensions = extensions + self.handler_cls = handler_cls + + def make_websocket(self, sock, protocols, extensions, environ): + """ + Initialize the `handler_cls` instance with the given + negociated sets of protocols and extensions as well as + the `environ` and `sock`. + + Stores then the instance in the `environ` dict + under the `'ws4py.websocket'` key. + """ + websocket = self.handler_cls(sock, protocols, extensions, + environ.copy()) + environ['ws4py.websocket'] = websocket + return websocket + + def __call__(self, environ, start_response): + if environ.get('REQUEST_METHOD') != 'GET': + raise HandshakeError('HTTP method must be a GET') + + for key, expected_value in [('HTTP_UPGRADE', 'websocket'), + ('HTTP_CONNECTION', 'upgrade')]: + actual_value = environ.get(key, '').lower() + if not actual_value: + raise HandshakeError('Header %s is not defined' % key) + if expected_value not in actual_value: + raise HandshakeError('Illegal value for header %s: %s' % + (key, actual_value)) + + key = environ.get('HTTP_SEC_WEBSOCKET_KEY') + if key: + ws_key = base64.b64decode(key.encode('utf-8')) + if len(ws_key) != 16: + raise HandshakeError("WebSocket key's length is invalid") + + version = environ.get('HTTP_SEC_WEBSOCKET_VERSION') + supported_versions = b', '.join([unicode(v).encode('utf-8') for v in WS_VERSION]) + version_is_valid = False + if version: + try: version = int(version) + except: pass + else: version_is_valid = version in WS_VERSION + + if not version_is_valid: + environ['websocket.version'] = unicode(version).encode('utf-8') + raise HandshakeError('Unhandled or missing WebSocket version') + + ws_protocols = [] + protocols = self.protocols or [] + subprotocols = environ.get('HTTP_SEC_WEBSOCKET_PROTOCOL') + if subprotocols: + for s in subprotocols.split(','): + s = s.strip() + if s in protocols: + ws_protocols.append(s) + + ws_extensions = [] + exts = self.extensions or [] + extensions = environ.get('HTTP_SEC_WEBSOCKET_EXTENSIONS') + if extensions: + for ext in extensions.split(','): + ext = ext.strip() + if ext in exts: + ws_extensions.append(ext) + + accept_value = base64.b64encode(sha1(key.encode('utf-8') + WS_KEY).digest()) + if py3k: accept_value = accept_value.decode('utf-8') + upgrade_headers = [ + ('Upgrade', 'websocket'), + ('Connection', 'Upgrade'), + ('Sec-WebSocket-Version', '%s' % version), + ('Sec-WebSocket-Accept', accept_value), + ] + if ws_protocols: + upgrade_headers.append(('Sec-WebSocket-Protocol', ', '.join(ws_protocols))) + if ws_extensions: + upgrade_headers.append(('Sec-WebSocket-Extensions', ','.join(ws_extensions))) + + start_response("101 Switching Protocols", upgrade_headers) + + self.make_websocket(environ['ws4py.socket'], + ws_protocols, + ws_extensions, + environ) + + return [] diff --git a/JUNK/WebSocket-for-Python-master/ws4py/streaming.py b/JUNK/WebSocket-for-Python-master/ws4py/streaming.py new file mode 100644 index 0000000..4420ba1 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/streaming.py @@ -0,0 +1,319 @@ +# -*- coding: utf-8 -*- +import struct +from struct import unpack + +from ws4py.utf8validator import Utf8Validator +from ws4py.messaging import TextMessage, BinaryMessage, CloseControlMessage,\ + PingControlMessage, PongControlMessage +from ws4py.framing import Frame, OPCODE_CONTINUATION, OPCODE_TEXT, \ + OPCODE_BINARY, OPCODE_CLOSE, OPCODE_PING, OPCODE_PONG +from ws4py.exc import FrameTooLargeException, ProtocolException, InvalidBytesError,\ + TextFrameEncodingException, UnsupportedFrameTypeException, StreamClosed +from ws4py.compat import py3k + +VALID_CLOSING_CODES = [1000, 1001, 1002, 1003, 1007, 1008, 1009, 1010, 1011] + +class Stream(object): + def __init__(self, always_mask=False, expect_masking=True): + """ Represents a websocket stream of bytes flowing in and out. + + The stream doesn't know about the data provider itself and + doesn't even know about sockets. Instead the stream simply + yields for more bytes whenever it requires them. The stream owner + is responsible to provide the stream with those bytes until + a frame can be interpreted. + + .. code-block:: python + :linenos: + + >>> s = Stream() + >>> s.parser.send(BYTES) + >>> s.has_messages + False + >>> s.parser.send(MORE_BYTES) + >>> s.has_messages + True + >>> s.message + + + Set ``always_mask`` to mask all frames built. + + Set ``expect_masking`` to indicate masking will be + checked on all parsed frames. + """ + + self.message = None + """ + Parsed test or binary messages. Whenever the parser + reads more bytes from a fragment message, those bytes + are appended to the most recent message. + """ + + self.pings = [] + """ + Parsed ping control messages. They are instances of + :class:`ws4py.messaging.PingControlMessage` + """ + + self.pongs = [] + """ + Parsed pong control messages. They are instances of + :class:`ws4py.messaging.PongControlMessage` + """ + + self.closing = None + """ + Parsed close control messsage. Instance of + :class:`ws4py.messaging.CloseControlMessage` + """ + + self.errors = [] + """ + Detected errors while parsing. Instances of + :class:`ws4py.messaging.CloseControlMessage` + """ + + self._parser = None + """ + Parser in charge to process bytes it is fed with. + """ + + self.always_mask = always_mask + self.expect_masking = expect_masking + + @property + def parser(self): + if self._parser is None: + self._parser = self.receiver() + # Python generators must be initialized once. + next(self.parser) + return self._parser + + def _cleanup(self): + """ + Frees the stream's resources rendering it unusable. + """ + self.message = None + if self._parser is not None: + if not self._parser.gi_running: + self._parser.close() + self._parser = None + self.errors = None + self.pings = None + self.pongs = None + self.closing = None + + def text_message(self, text): + """ + Returns a :class:`ws4py.messaging.TextMessage` instance + ready to be built. Convenience method so + that the caller doesn't need to import the + :class:`ws4py.messaging.TextMessage` class itself. + """ + return TextMessage(text=text) + + def binary_message(self, bytes): + """ + Returns a :class:`ws4py.messaging.BinaryMessage` instance + ready to be built. Convenience method so + that the caller doesn't need to import the + :class:`ws4py.messaging.BinaryMessage` class itself. + """ + return BinaryMessage(bytes) + + @property + def has_message(self): + """ + Checks if the stream has received any message + which, if fragmented, is now completed. + """ + if self.message is not None: + return self.message.completed + + return False + + def close(self, code=1000, reason=''): + """ + Returns a close control message built from + a :class:`ws4py.messaging.CloseControlMessage` instance, + using the given status ``code`` and ``reason`` message. + """ + return CloseControlMessage(code=code, reason=reason) + + def ping(self, data=''): + """ + Returns a ping control message built from + a :class:`ws4py.messaging.PingControlMessage` instance. + """ + return PingControlMessage(data).single(mask=self.always_mask) + + def pong(self, data=''): + """ + Returns a ping control message built from + a :class:`ws4py.messaging.PongControlMessage` instance. + """ + return PongControlMessage(data).single(mask=self.always_mask) + + def receiver(self): + """ + Parser that keeps trying to interpret bytes it is fed with as + incoming frames part of a message. + + Control message are single frames only while data messages, like text + and binary, may be fragmented accross frames. + + The way it works is by instanciating a :class:`wspy.framing.Frame` object, + then running its parser generator which yields how much bytes + it requires to performs its task. The stream parser yields this value + to its caller and feeds the frame parser. + + When the frame parser raises :exc:`StopIteration`, the stream parser + tries to make sense of the parsed frame. It dispatches the frame's bytes + to the most appropriate message type based on the frame's opcode. + + Overall this makes the stream parser totally agonstic to + the data provider. + """ + utf8validator = Utf8Validator() + running = True + frame = None + while running: + frame = Frame() + while 1: + try: + some_bytes = (yield next(frame.parser)) + frame.parser.send(some_bytes) + except GeneratorExit: + running = False + break + except StopIteration: + frame._cleanup() + some_bytes = frame.body + + # Let's avoid unmasking when there is no payload + if some_bytes: + if frame.masking_key and self.expect_masking: + some_bytes = frame.unmask(some_bytes) + elif not frame.masking_key and self.expect_masking: + msg = CloseControlMessage(code=1002, reason='Missing masking when expected') + self.errors.append(msg) + break + elif frame.masking_key and not self.expect_masking: + msg = CloseControlMessage(code=1002, reason='Masked when not expected') + self.errors.append(msg) + break + else: + # If we reach this stage, it's because + # the frame wasn't masked and we didn't expect + # it anyway. Therefore, on py2k, the bytes + # are actually a str object and can't be used + # in the utf8 validator as we need integers + # when we get each byte one by one. + # Our only solution here is to convert our + # string to a bytearray. + some_bytes = bytearray(some_bytes) + + if frame.opcode == OPCODE_TEXT: + if self.message and not self.message.completed: + # We got a text frame before we completed the previous one + msg = CloseControlMessage(code=1002, reason='Received a new message before completing previous') + self.errors.append(msg) + break + + m = TextMessage(some_bytes) + m.completed = (frame.fin == 1) + self.message = m + + if some_bytes: + is_valid, end_on_code_point, _, _ = utf8validator.validate(some_bytes) + + if not is_valid or (m.completed and not end_on_code_point): + self.errors.append(CloseControlMessage(code=1007, reason='Invalid UTF-8 bytes')) + break + + elif frame.opcode == OPCODE_BINARY: + if self.message and not self.message.completed: + # We got a text frame before we completed the previous one + msg = CloseControlMessage(code=1002, reason='Received a new message before completing previous') + self.errors.append(msg) + break + + m = BinaryMessage(some_bytes) + m.completed = (frame.fin == 1) + self.message = m + + elif frame.opcode == OPCODE_CONTINUATION: + m = self.message + if m is None: + self.errors.append(CloseControlMessage(code=1002, reason='Message not started yet')) + break + + m.extend(some_bytes) + m.completed = (frame.fin == 1) + if m.opcode == OPCODE_TEXT: + if some_bytes: + is_valid, end_on_code_point, _, _ = utf8validator.validate(some_bytes) + + if not is_valid or (m.completed and not end_on_code_point): + self.errors.append(CloseControlMessage(code=1007, reason='Invalid UTF-8 bytes')) + break + + elif frame.opcode == OPCODE_CLOSE: + code = 1005 + reason = "" + if frame.payload_length == 0: + self.closing = CloseControlMessage(code=1005) + elif frame.payload_length == 1: + self.closing = CloseControlMessage(code=1005, reason='Payload has invalid length') + else: + try: + # at this stage, some_bytes have been unmasked + # so actually are held in a bytearray + code = int(unpack("!H", bytes(some_bytes[0:2]))[0]) + except struct.error: + reason = 'Failed at decoding closing code' + else: + # Those codes are reserved or plainly forbidden + if code not in VALID_CLOSING_CODES and not (2999 < code < 5000): + reason = 'Invalid Closing Frame Code: %d' % code + code = 1005 + elif frame.payload_length > 1: + reason = some_bytes[2:] if frame.masking_key else frame.body[2:] + + if not py3k: reason = bytearray(reason) + is_valid, end_on_code_point, _, _ = utf8validator.validate(reason) + if not is_valid or not end_on_code_point: + self.errors.append(CloseControlMessage(code=1007, reason='Invalid UTF-8 bytes')) + break + reason = bytes(reason) + self.closing = CloseControlMessage(code=code, reason=reason) + + elif frame.opcode == OPCODE_PING: + self.pings.append(PingControlMessage(some_bytes)) + + elif frame.opcode == OPCODE_PONG: + self.pongs.append(PongControlMessage(some_bytes)) + + else: + self.errors.append(CloseControlMessage(code=1003)) + + break + + except ProtocolException: + self.errors.append(CloseControlMessage(code=1002)) + break + except FrameTooLargeException: + self.errors.append(CloseControlMessage(code=1002, reason="Frame was too large")) + break + + frame._cleanup() + frame.body = None + frame = None + + if self.message is not None and self.message.completed: + utf8validator.reset() + + utf8validator.reset() + utf8validator = None + + self._cleanup() diff --git a/JUNK/WebSocket-for-Python-master/ws4py/utf8validator.py b/JUNK/WebSocket-for-Python-master/ws4py/utf8validator.py new file mode 100644 index 0000000..50b19e5 --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/utf8validator.py @@ -0,0 +1,117 @@ +# coding=utf-8 + +############################################################################### +## +## Copyright 2011 Tavendo GmbH +## +## Note: +## +## This code is a Python implementation of the algorithm +## +## "Flexible and Economical UTF-8 Decoder" +## +## by Bjoern Hoehrmann +## +## bjoern@hoehrmann.de +## http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ +## +## 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. +## +############################################################################### + + +class Utf8Validator(object): + """ + Incremental UTF-8 validator with constant memory consumption (minimal state). + + Implements the algorithm "Flexible and Economical UTF-8 Decoder" by + Bjoern Hoehrmann (http://bjoern.hoehrmann.de/utf-8/decoder/dfa/). + """ + + ## DFA transitions + UTF8VALIDATOR_DFA = [ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, # 00..1f + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, # 20..3f + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, # 40..5f + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, # 60..7f + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, # 80..9f + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, # a0..bf + 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, # c0..df + 0xa,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x4,0x3,0x3, # e0..ef + 0xb,0x6,0x6,0x6,0x5,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, # f0..ff + 0x0,0x1,0x2,0x3,0x5,0x8,0x7,0x1,0x1,0x1,0x4,0x6,0x1,0x1,0x1,0x1, # s0..s0 + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,1, # s1..s2 + 1,2,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1, # s3..s4 + 1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,3,1,1,1,1,1,1, # s5..s6 + 1,3,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1, # s7..s8 + ] + + UTF8_ACCEPT = 0 + UTF8_REJECT = 1 + + def __init__(self): + self.reset() + + def decode(self, b): + """ + Eat one UTF-8 octet, and validate on the fly. + + Returns UTF8_ACCEPT when enough octets have been consumed, in which case + self.codepoint contains the decoded Unicode code point. + + Returns UTF8_REJECT when invalid UTF-8 was encountered. + + Returns some other positive integer when more octets need to be eaten. + """ + type = Utf8Validator.UTF8VALIDATOR_DFA[b] + if self.state != Utf8Validator.UTF8_ACCEPT: + self.codepoint = (b & 0x3f) | (self.codepoint << 6) + else: + self.codepoint = (0xff >> type) & b + self.state = Utf8Validator.UTF8VALIDATOR_DFA[256 + self.state * 16 + type] + return self.state + + def reset(self): + """ + Reset validator to start new incremental UTF-8 decode/validation. + """ + self.state = Utf8Validator.UTF8_ACCEPT + self.codepoint = 0 + self.i = 0 + + def validate(self, ba): + """ + Incrementally validate a chunk of bytes provided as bytearray. + + Will return a quad (valid?, endsOnCodePoint?, currentIndex, totalIndex). + + As soon as an octet is encountered which renders the octet sequence + invalid, a quad with valid? == False is returned. currentIndex returns + the index within the currently consumed chunk, and totalIndex the + index within the total consumed sequence that was the point of bail out. + When valid? == True, currentIndex will be len(ba) and totalIndex the + total amount of consumed bytes. + """ + state = self.state + DFA = Utf8Validator.UTF8VALIDATOR_DFA + i = 0 # make sure 'i' is set if when 'ba' is empty + for i, b in enumerate(ba): + ## optimized version of decode(), since we are not interested in actual code points + state = DFA[256 + (state << 4) + DFA[b]] + if state == Utf8Validator.UTF8_REJECT: + self.i += i + self.state = state + return False, False, i, self.i + self.i += i + self.state = state + return True, state == Utf8Validator.UTF8_ACCEPT, i, self.i diff --git a/JUNK/WebSocket-for-Python-master/ws4py/websocket.py b/JUNK/WebSocket-for-Python-master/ws4py/websocket.py new file mode 100644 index 0000000..511921e --- /dev/null +++ b/JUNK/WebSocket-for-Python-master/ws4py/websocket.py @@ -0,0 +1,535 @@ +# -*- coding: utf-8 -*- +import logging +import socket +import ssl +import time +import threading +import types +import errno + +try: + from OpenSSL.SSL import Error as pyOpenSSLError +except ImportError: + class pyOpenSSLError(Exception): + pass + +from ws4py import WS_KEY, WS_VERSION +from ws4py.exc import HandshakeError, StreamClosed +from ws4py.streaming import Stream +from ws4py.messaging import Message, PingControlMessage,\ + PongControlMessage +from ws4py.compat import basestring, unicode + +DEFAULT_READING_SIZE = 2 + +logger = logging.getLogger('ws4py') + +__all__ = ['WebSocket', 'EchoWebSocket', 'Heartbeat'] + +class Heartbeat(threading.Thread): + def __init__(self, websocket, frequency=2.0): + """ + Runs at a periodic interval specified by + `frequency` by sending an unsolicitated pong + message to the connected peer. + + If the message fails to be sent and a socket + error is raised, we close the websocket + socket automatically, triggering the `closed` + handler. + """ + threading.Thread.__init__(self) + self.websocket = websocket + self.frequency = frequency + + def __enter__(self): + if self.frequency: + self.start() + return self + + def __exit__(self, exc_type, exc_value, exc_tb): + self.stop() + + def stop(self): + self.running = False + + def run(self): + self.running = True + while self.running: + time.sleep(self.frequency) + if self.websocket.terminated: + break + + try: + self.websocket.send(PongControlMessage(data='beep')) + except socket.error: + logger.info("Heartbeat failed") + self.websocket.server_terminated = True + self.websocket.close_connection() + break + +class WebSocket(object): + """ Represents a websocket endpoint and provides a high level interface to drive the endpoint. """ + + def __init__(self, sock, protocols=None, extensions=None, environ=None, heartbeat_freq=None): + """ The ``sock`` is an opened connection + resulting from the websocket handshake. + + If ``protocols`` is provided, it is a list of protocols + negotiated during the handshake as is ``extensions``. + + If ``environ`` is provided, it is a copy of the WSGI environ + dictionnary from the underlying WSGI server. + """ + + self.stream = Stream(always_mask=False) + """ + Underlying websocket stream that performs the websocket + parsing to high level objects. By default this stream + never masks its messages. Clients using this class should + set the ``stream.always_mask`` fields to ``True`` + and ``stream.expect_masking`` fields to ``False``. + """ + + self.protocols = protocols + """ + List of protocols supported by this endpoint. + Unused for now. + """ + + self.extensions = extensions + """ + List of extensions supported by this endpoint. + Unused for now. + """ + + self.sock = sock + """ + Underlying connection. + """ + + self._is_secure = hasattr(sock, '_ssl') or hasattr(sock, '_sslobj') + """ + Tell us if the socket is secure or not. + """ + + self.client_terminated = False + """ + Indicates if the client has been marked as terminated. + """ + + self.server_terminated = False + """ + Indicates if the server has been marked as terminated. + """ + + self.reading_buffer_size = DEFAULT_READING_SIZE + """ + Current connection reading buffer size. + """ + + self.environ = environ + """ + WSGI environ dictionary. + """ + + self.heartbeat_freq = heartbeat_freq + """ + At which interval the heartbeat will be running. + Set this to `0` or `None` to disable it entirely. + """ + "Internal buffer to get around SSL problems" + self.buf = b'' + + self._local_address = None + self._peer_address = None + + @property + def local_address(self): + """ + Local endpoint address as a tuple + """ + if not self._local_address: + self._local_address = self.sock.getsockname() + if len(self._local_address) == 4: + self._local_address = self._local_address[:2] + return self._local_address + + @property + def peer_address(self): + """ + Peer endpoint address as a tuple + """ + if not self._peer_address: + self._peer_address = self.sock.getpeername() + if len(self._peer_address) == 4: + self._peer_address = self._peer_address[:2] + return self._peer_address + + def opened(self): + """ + Called by the server when the upgrade handshake + has succeeded. + """ + pass + + def close(self, code=1000, reason=''): + """ + Call this method to initiate the websocket connection + closing by sending a close frame to the connected peer. + The ``code`` is the status code representing the + termination's reason. + + Once this method is called, the ``server_terminated`` + attribute is set. Calling this method several times is + safe as the closing frame will be sent only the first + time. + + .. seealso:: Defined Status Codes http://tools.ietf.org/html/rfc6455#section-7.4.1 + """ + if not self.server_terminated: + self.server_terminated = True + try: + self._write(self.stream.close(code=code, reason=reason).single(mask=self.stream.always_mask)) + except Exception as ex: + logger.error("Error when terminating the connection: %s", str(ex)) + + def closed(self, code, reason=None): + """ + Called when the websocket stream and connection are finally closed. + The provided ``code`` is status set by the other point and + ``reason`` is a human readable message. + + .. seealso:: Defined Status Codes http://tools.ietf.org/html/rfc6455#section-7.4.1 + """ + pass + + @property + def terminated(self): + """ + Returns ``True`` if both the client and server have been + marked as terminated. + """ + return self.client_terminated is True and self.server_terminated is True + + @property + def connection(self): + return self.sock + + def close_connection(self): + """ + Shutdowns then closes the underlying connection. + """ + if self.sock: + try: + self.sock.shutdown(socket.SHUT_RDWR) + self.sock.close() + except: + pass + finally: + self.sock = None + + def ping(self, message): + """ + Send a ping message to the remote peer. + The given `message` must be a unicode string. + """ + self.send(PingControlMessage(message)) + + def ponged(self, pong): + """ + Pong message, as a :class:`messaging.PongControlMessage` instance, + received on the stream. + """ + pass + + def received_message(self, message): + """ + Called whenever a complete ``message``, binary or text, + is received and ready for application's processing. + + The passed message is an instance of :class:`messaging.TextMessage` + or :class:`messaging.BinaryMessage`. + + .. note:: You should override this method in your subclass. + """ + pass + + def unhandled_error(self, error): + """ + Called whenever a socket, or an OS, error is trapped + by ws4py but not managed by it. The given error is + an instance of `socket.error` or `OSError`. + + Note however that application exceptions will not go + through this handler. Instead, do make sure you + protect your code appropriately in `received_message` + or `send`. + + The default behaviour of this handler is to log + the error with a message. + """ + logger.exception("Failed to receive data") + + def _write(self, b): + """ + Trying to prevent a write operation + on an already closed websocket stream. + + This cannot be bullet proof but hopefully + will catch almost all use cases. + """ + if self.terminated or self.sock is None: + raise RuntimeError("Cannot send on a terminated websocket") + + self.sock.sendall(b) + + def send(self, payload, binary=False): + """ + Sends the given ``payload`` out. + + If ``payload`` is some bytes or a bytearray, + then it is sent as a single message not fragmented. + + If ``payload`` is a generator, each chunk is sent as part of + fragmented message. + + If ``binary`` is set, handles the payload as a binary message. + """ + message_sender = self.stream.binary_message if binary else self.stream.text_message + + if isinstance(payload, basestring) or isinstance(payload, bytearray): + m = message_sender(payload).single(mask=self.stream.always_mask) + self._write(m) + + elif isinstance(payload, Message): + data = payload.single(mask=self.stream.always_mask) + self._write(data) + + elif type(payload) == types.GeneratorType: + bytes = next(payload) + first = True + for chunk in payload: + self._write(message_sender(bytes).fragment(first=first, mask=self.stream.always_mask)) + bytes = chunk + first = False + + self._write(message_sender(bytes).fragment(first=first, last=True, mask=self.stream.always_mask)) + + else: + raise ValueError("Unsupported type '%s' passed to send()" % type(payload)) + + def _get_from_pending(self): + """ + The SSL socket object provides the same interface + as the socket interface but behaves differently. + + When data is sent over a SSL connection + more data may be read than was requested from by + the ws4py websocket object. + + In that case, the data may have been indeed read + from the underlying real socket, but not read by the + application which will expect another trigger from the + manager's polling mechanism as if more data was still on the + wire. This will happen only when new data is + sent by the other peer which means there will be + some delay before the initial read data is handled + by the application. + + Due to this, we have to rely on a non-public method + to query the internal SSL socket buffer if it has indeed + more data pending in its buffer. + + Now, some people in the Python community + `discourage `_ + this usage of the ``pending()`` method because it's not + the right way of dealing with such use case. They advise + `this approach `_ + instead. Unfortunately, this applies only if the + application can directly control the poller which is not + the case with the WebSocket abstraction here. + + We therefore rely on this `technic `_ + which seems to be valid anyway. + + This is a bit of a shame because we have to process + more data than what wanted initially. + """ + data = b"" + pending = self.sock.pending() + while pending: + data += self.sock.recv(pending) + pending = self.sock.pending() + return data + + def once(self): + """ + Performs the operation of reading from the underlying + connection in order to feed the stream of bytes. + + Because this needs to support SSL sockets, we must always + read as much as might be in the socket at any given time, + however process expects to have itself called with only a certain + number of bytes at a time. That number is found in + self.reading_buffer_size, so we read everything into our own buffer, + and then from there feed self.process. + + Then the stream indicates + whatever size must be read from the connection since + it knows the frame payload length. + + It returns `False` if an error occurred at the + socket level or during the bytes processing. Otherwise, + it returns `True`. + """ + if self.terminated: + logger.debug("WebSocket is already terminated") + return False + try: + b = self.sock.recv(self.reading_buffer_size) + if self._is_secure: + b += self._get_from_pending() + if not b: + return False + self.buf += b + except (socket.error, OSError, pyOpenSSLError) as e: + if hasattr(e, "errno") and e.errno == errno.EINTR: + pass + else: + self.unhandled_error(e) + return False + else: + # process as much as we can + # the process will stop either if there is no buffer left + # or if the stream is closed + if not self.process(self.buf): + return False + self.buf = b"" + + return True + + def terminate(self): + """ + Completes the websocket by calling the `closed` + method either using the received closing code + and reason, or when none was received, using + the special `1006` code. + + Finally close the underlying connection for + good and cleanup resources by unsetting + the `environ` and `stream` attributes. + """ + s = self.stream + + try: + if s.closing is None: + self.closed(1006, "Going away") + else: + self.closed(s.closing.code, s.closing.reason) + finally: + self.client_terminated = self.server_terminated = True + self.close_connection() + + # Cleaning up resources + s._cleanup() + self.stream = None + self.environ = None + + def process(self, bytes): + """ Takes some bytes and process them through the + internal stream's parser. If a message of any kind is + found, performs one of these actions: + + * A closing message will initiate the closing handshake + * Errors will initiate a closing handshake + * A message will be passed to the ``received_message`` method + * Pings will see pongs be sent automatically + * Pongs will be passed to the ``ponged`` method + + The process should be terminated when this method + returns ``False``. + """ + s = self.stream + + if not bytes and self.reading_buffer_size > 0: + return False + + self.reading_buffer_size = s.parser.send(bytes) or DEFAULT_READING_SIZE + + if s.closing is not None: + logger.debug("Closing message received (%d) '%s'" % (s.closing.code, s.closing.reason)) + if not self.server_terminated: + self.close(s.closing.code, s.closing.reason) + else: + self.client_terminated = True + return False + + if s.errors: + for error in s.errors: + logger.debug("Error message received (%d) '%s'" % (error.code, error.reason)) + self.close(error.code, error.reason) + s.errors = [] + return False + + if s.has_message: + self.received_message(s.message) + if s.message is not None: + s.message.data = None + s.message = None + return True + + if s.pings: + for ping in s.pings: + self._write(s.pong(ping.data)) + s.pings = [] + + if s.pongs: + for pong in s.pongs: + self.ponged(pong) + s.pongs = [] + + return True + + def run(self): + """ + Performs the operation of reading from the underlying + connection in order to feed the stream of bytes. + + We start with a small size of two bytes to be read + from the connection so that we can quickly parse an + incoming frame header. Then the stream indicates + whatever size must be read from the connection since + it knows the frame payload length. + + Note that we perform some automatic opererations: + + * On a closing message, we respond with a closing + message and finally close the connection + * We respond to pings with pong messages. + * Whenever an error is raised by the stream parsing, + we initiate the closing of the connection with the + appropiate error code. + + This method is blocking and should likely be run + in a thread. + """ + self.sock.setblocking(True) + with Heartbeat(self, frequency=self.heartbeat_freq): + s = self.stream + + try: + self.opened() + while not self.terminated: + if not self.once(): + break + finally: + self.terminate() + +class EchoWebSocket(WebSocket): + def received_message(self, message): + """ + Automatically sends back the provided ``message`` to + its originating endpoint. + """ + self.send(message.data, message.is_binary) diff --git a/JUNK/Websocket/.gitignore b/JUNK/Websocket/.gitignore new file mode 100644 index 0000000..39fb081 --- /dev/null +++ b/JUNK/Websocket/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.externalNativeBuild diff --git a/JUNK/Websocket/.idea/compiler.xml b/JUNK/Websocket/.idea/compiler.xml new file mode 100644 index 0000000..96cc43e --- /dev/null +++ b/JUNK/Websocket/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JUNK/Websocket/.idea/copyright/profiles_settings.xml b/JUNK/Websocket/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/JUNK/Websocket/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/JUNK/Websocket/.idea/gradle.xml b/JUNK/Websocket/.idea/gradle.xml new file mode 100644 index 0000000..7ac24c7 --- /dev/null +++ b/JUNK/Websocket/.idea/gradle.xml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/JUNK/Websocket/.idea/inspectionProfiles/Project_Default.xml b/JUNK/Websocket/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..5f39510 --- /dev/null +++ b/JUNK/Websocket/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/JUNK/Websocket/.idea/inspectionProfiles/profiles_settings.xml b/JUNK/Websocket/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..3b31283 --- /dev/null +++ b/JUNK/Websocket/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/JUNK/Websocket/.idea/misc.xml b/JUNK/Websocket/.idea/misc.xml new file mode 100644 index 0000000..5d19981 --- /dev/null +++ b/JUNK/Websocket/.idea/misc.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JUNK/Websocket/.idea/modules.xml b/JUNK/Websocket/.idea/modules.xml new file mode 100644 index 0000000..996e160 --- /dev/null +++ b/JUNK/Websocket/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/JUNK/Websocket/.idea/runConfigurations.xml b/JUNK/Websocket/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/JUNK/Websocket/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/JUNK/Websocket/app/.gitignore b/JUNK/Websocket/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/JUNK/Websocket/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/JUNK/Websocket/app/build.gradle b/JUNK/Websocket/app/build.gradle new file mode 100644 index 0000000..33a1d0a --- /dev/null +++ b/JUNK/Websocket/app/build.gradle @@ -0,0 +1,35 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 26 + buildToolsVersion "26.0.0" + defaultConfig { + applicationId "com.example.tejas.websocket" + minSdkVersion 23 + targetSdkVersion 26 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + exclude group: 'com.android.support', module: 'support-annotations' + }) + compile 'com.android.support:appcompat-v7:26.+' + compile 'com.android.support.constraint:constraint-layout:1.0.2' + compile 'com.squareup.okhttp3:okhttp:3.6.0' + testCompile 'junit:junit:4.12' + compile ('io.socket:socket.io-client:0.8.3') { + // excluding org.json which is provided by Android + exclude group: 'org.json', module: 'json' + } +} diff --git a/JUNK/Websocket/app/proguard-rules.pro b/JUNK/Websocket/app/proguard-rules.pro new file mode 100644 index 0000000..6733beb --- /dev/null +++ b/JUNK/Websocket/app/proguard-rules.pro @@ -0,0 +1,25 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in C:\Users\Tejas\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/JUNK/Websocket/app/src/androidTest/java/com/example/tejas/websocket/ExampleInstrumentedTest.java b/JUNK/Websocket/app/src/androidTest/java/com/example/tejas/websocket/ExampleInstrumentedTest.java new file mode 100644 index 0000000..7243eec --- /dev/null +++ b/JUNK/Websocket/app/src/androidTest/java/com/example/tejas/websocket/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.tejas.websocket; + +import android.content.Context; +import android.support.test.InstrumentationRegistry; +import android.support.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumentation test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() throws Exception { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getTargetContext(); + + assertEquals("com.example.tejas.websocket", appContext.getPackageName()); + } +} diff --git a/JUNK/Websocket/app/src/main/AndroidManifest.xml b/JUNK/Websocket/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..8dda0eb --- /dev/null +++ b/JUNK/Websocket/app/src/main/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JUNK/Websocket/app/src/main/java/com/example/tejas/websocket/Client.java b/JUNK/Websocket/app/src/main/java/com/example/tejas/websocket/Client.java new file mode 100644 index 0000000..dc2af27 --- /dev/null +++ b/JUNK/Websocket/app/src/main/java/com/example/tejas/websocket/Client.java @@ -0,0 +1,100 @@ +package com.example.tejas.websocket; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.net.InetSocketAddress; +import java.net.Socket; + +/** + * Created by Tejas on 07-07-2017. + */ + +public class Client { + private Socket socket; + public OutputStream socketOutput; + public BufferedReader socketInput; + + private String ip; + private int port; + private ClientCallback listener=null; + + public Client(String ip, int port){ + this.ip=ip; + this.port=port; + } + + public void connect(){ + new Thread(new Runnable() { + @Override + public void run() { + socket = new Socket(); + InetSocketAddress socketAddress = new InetSocketAddress(ip, port); + try { + socket.connect(socketAddress); + socketOutput = socket.getOutputStream(); + socketInput = new BufferedReader(new InputStreamReader(socket.getInputStream())); + + new ReceiveThread().start(); + + if(listener!=null) + listener.onConnect(socket); + } catch (IOException e) { + if(listener!=null) + listener.onConnectError(socket, e.getMessage()); + } + } + }).start(); + } + + public void disconnect(){ + try { + socket.close(); + } catch (IOException e) { + if(listener!=null) + listener.onDisconnect(socket, e.getMessage()); + } + } + + public void send(String message){ + try { + socketOutput.write(message.getBytes()); + } catch (IOException e) { + if(listener!=null) + listener.onDisconnect(socket, e.getMessage()); + } + } + + + + private class ReceiveThread extends Thread implements Runnable{ + public void run(){ + String message; + try { + while((message = socketInput.readLine()) != null) { // each line must end with a \n to be received + if(listener!=null) + listener.onMessage(message); + } + } catch (IOException e) { + if(listener!=null) + listener.onDisconnect(socket, e.getMessage()); + } + } + } + + public void setClientCallback(ClientCallback listener){ + this.listener=listener; + } + + public void removeClientCallback(){ + this.listener=null; + } + + public interface ClientCallback { + void onMessage(String message); + void onConnect(Socket socket); + void onDisconnect(Socket socket, String message); + void onConnectError(Socket socket, String message); + } +} \ No newline at end of file diff --git a/JUNK/Websocket/app/src/main/java/com/example/tejas/websocket/MainActivity.java b/JUNK/Websocket/app/src/main/java/com/example/tejas/websocket/MainActivity.java new file mode 100644 index 0000000..546ab7b --- /dev/null +++ b/JUNK/Websocket/app/src/main/java/com/example/tejas/websocket/MainActivity.java @@ -0,0 +1,62 @@ +package com.example.tejas.websocket; + +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.Toast; + +import java.io.BufferedInputStream; +import java.io.IOException; +import java.net.Socket; + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + connectWebSocket(); + + + } + + private void connectWebSocket() { + String test= ""; + Button b1 = (Button)findViewById(R.id.Button_Push); + final Client socket = new Client("192.168.1.9", 3000); + Toast.makeText(this, "test", Toast.LENGTH_SHORT).show(); + socket.connect(); + socket.setClientCallback(new Client.ClientCallback() { + @Override + public void onMessage(String message) { + + } + + @Override + public void onConnect(Socket socket) { + + } + + @Override + public void onDisconnect(Socket socket, String message) { + + } + + @Override + public void onConnectError(Socket socket, String message) { + + } + }); + + Toast.makeText(MainActivity.this, test , Toast.LENGTH_SHORT).show(); + b1.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + + + } + }); + + } +} \ No newline at end of file diff --git a/JUNK/Websocket/app/src/main/res/layout/activity_main.xml b/JUNK/Websocket/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..7f49b62 --- /dev/null +++ b/JUNK/Websocket/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,19 @@ + + + + + + + + + + diff --git a/JUNK/chat-example-master/index.js b/JUNK/chat-example-master/index.js new file mode 100644 index 0000000..ffd4d84 --- /dev/null +++ b/JUNK/chat-example-master/index.js @@ -0,0 +1,35 @@ +var app = require('express')(); +var http = require('http').Server(app); +var io = require('socket.io')(http); +var port = 4000; +var sql_query = "" +var mysql = require('mysql'); +var connection = mysql.createConnection({ + host:'localhost', + user: 'root', + password: '', + database: 'sampleDB' +}); + +connection.connect(function(error){ + if(!!error){ + console.log('error'); + } + else { + console.log('connected'); + } +}); + +app.get('/', function(req, res){ + res.sendFile(__dirname + '/index.html'); +}); + +io.on('connection', function(socket){ + socket.on('chat message', function(msg){ + io.emit('chat message', msg); + }); +}); + +http.listen(port, function(){ + console.log('listening on *:' + port); +}); diff --git a/JUNK/chat-example-master/package.json b/JUNK/chat-example-master/package.json new file mode 100644 index 0000000..15c1015 --- /dev/null +++ b/JUNK/chat-example-master/package.json @@ -0,0 +1,23 @@ +{ + "name": "webapp", + "version": "1.0.0", + "description": "Simple app", + "main": "server.js", + "scripts": { + "test": "test" + }, + "repository": { + "type": "git", + "url": "non" + }, + "keywords": [ + "non" + ], + "author": "Tejas", + "license": "ISC", + "dependencies":{ + "socket.io":"*", + "express":"*", + "mysql":"*" + } +} diff --git a/JUNK/socket.io-client-java-master/.gitignore b/JUNK/socket.io-client-java-master/.gitignore new file mode 100644 index 0000000..d26349c --- /dev/null +++ b/JUNK/socket.io-client-java-master/.gitignore @@ -0,0 +1,16 @@ +*.class + +# Package Files # +*.jar +*.war +*.ear + +# Intellij project files +*.iml +*.ipr +*.iws +.idea/ + +.DS_Store +target/ +node_modules/ diff --git a/JUNK/socket.io-client-java-master/.travis.yml b/JUNK/socket.io-client-java-master/.travis.yml new file mode 100644 index 0000000..ab29bcc --- /dev/null +++ b/JUNK/socket.io-client-java-master/.travis.yml @@ -0,0 +1,5 @@ +language: java +install: mvn install -DskipTests=true -Dgpg.skip=true +jdk: + - openjdk7 + - oraclejdk8 diff --git a/JUNK/socket.io-client-java-master/History.md b/JUNK/socket.io-client-java-master/History.md new file mode 100644 index 0000000..e1a1778 --- /dev/null +++ b/JUNK/socket.io-client-java-master/History.md @@ -0,0 +1,110 @@ + +0.8.3 / 2016-12-12 +================== + +* bump `engine.io-client` + +0.8.2 / 2016-10-22 +================== + +* bump `engine.io-client` + +0.8.1 / 2016-09-27 +================== + +* bump `engine.io-client` + +0.8.0 / 2016-09-23 +================== + +* bump `engine.io-client` +* README: fix typos [kylestev, lu-zero] +* test: use TLSv1 + +0.7.0 / 2016-02-01 +================== + +* compatible with socket.io 1.4.5 +* bump `engine.io-client` +* fix event type when emitting ack with binary data [cirocosta] +* don't reuse same namespace connections +* fix handling of disconnection while in `opening` state +* add ping and pong events +* improve cleanup on `Manager` + +0.6.3 / 2015-12-23 +================== + +* bump `engine.io-client`. +* fix back-off calculation +* code quality improvements [civanyp] + +0.6.2 / 2015-10-10 +================== + +* compatible with socket.io 1.3.7 +* bump `engine.io-client` +* fix wrong reconnection state + +0.6.1 / 2015-08-31 +================== + +* change package name to "io.socket" + +0.6.0 / 2015-08-09 +================== + +* bump `engine.io-client`. + +0.5.2 / 2015-06-28 +================== + +* make Socket.events protected [icapurro] +* fix readyState check on Manager#open +* change IO.socket(URI) not to throw URISyntaxException + +0.5.1 / 2015-06-06 +================== + +* bump `engine.io-client`. +* fix timeout option +* fix NullPointerException on ack + +0.5.0 / 2015-05-02 +================== + +* bump `engine.io-client`. +* enhance parser decode [niqo01] +* add a wrong event name check +* add setDefaultHostnameVerifier method + +0.4.2 / 2015-03-07 +================== + +* fix error on reconnection attemps + +0.4.1 / 2015-02-08 +================== + +* bump `engine.io-client`. +* fix program doesn't terminate when closing socket before eatablishing connection. + +0.4.0 / 2015-01-26 +================== + +* compatible with socket.io 1.3.2 +* bump `engine.io-client`. +* added `Socket#id()` pointing to session id +* add exponential backoff with randomization +* reset reconnection attempts state after a successul connection +* fix binary arguments in emit with ack [AlfioEmanueleFresta] + +0.3.0 / 2014-11-04 +================== + +* compatible with socket.io 1.2.0 +* bump `engine.io-client`. +* fix reconnection after reconnecting manually +* enable to stop reconnecting +* enable to reconnect manually +* add `Socket#connected()` diff --git a/JUNK/socket.io-client-java-master/LICENSE b/JUNK/socket.io-client-java-master/LICENSE new file mode 100644 index 0000000..d5af4cf --- /dev/null +++ b/JUNK/socket.io-client-java-master/LICENSE @@ -0,0 +1,32 @@ +The MIT License (MIT) +Copyright (c) 2013 Naoyuki Kanezawa + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +(The MIT License) + +Copyright (c) 2011 Guillermo Rauch + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/JUNK/socket.io-client-java-master/README.md b/JUNK/socket.io-client-java-master/README.md new file mode 100644 index 0000000..922289e --- /dev/null +++ b/JUNK/socket.io-client-java-master/README.md @@ -0,0 +1,182 @@ +# Socket.IO-client Java +[![Build Status](https://travis-ci.org/socketio/socket.io-client-java.png?branch=master)](https://travis-ci.org/socketio/socket.io-client-java) + +This is the Socket.IO v1.x Client Library for Java, which is simply ported from the [JavaScript client](https://github.com/socketio/socket.io-client). + +See also: + +- [Android chat demo](https://github.com/nkzawa/socket.io-android-chat) +- [engine.io-client-java](https://github.com/socketio/engine.io-client-java) + +## Installation +The latest artifact is available on Maven Central. You'll also need [dependencies](http://socketio.github.io/socket.io-client-java/dependencies.html) to install. + +**WARNING: The package name was changed to "io.socket" on v0.6.1 or later. Please make sure to update your dependency settings.** + +### Maven +Add the following dependency to your `pom.xml`. + +```xml + + + io.socket + socket.io-client + 0.8.3 + + +``` + +### Gradle +Add it as a gradle dependency for Android Studio, in `build.gradle`: + +```groovy +compile ('io.socket:socket.io-client:0.8.3') { + // excluding org.json which is provided by Android + exclude group: 'org.json', module: 'json' +} +``` + +## Usage +Socket.IO-client Java has almost the same api and features with the original JS client. You use `IO#socket` to initialize `Socket`: + +```java +socket = IO.socket("http://localhost"); +socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + + @Override + public void call(Object... args) { + socket.emit("foo", "hi"); + socket.disconnect(); + } + +}).on("event", new Emitter.Listener() { + + @Override + public void call(Object... args) {} + +}).on(Socket.EVENT_DISCONNECT, new Emitter.Listener() { + + @Override + public void call(Object... args) {} + +}); +socket.connect(); +``` + +This Library uses [org.json](http://www.json.org/java/) to parse and compose JSON strings: + +```java +// Sending an object +JSONObject obj = new JSONObject(); +obj.put("hello", "server"); +obj.put("binary", new byte[42]); +socket.emit("foo", obj); + +// Receiving an object +socket.on("foo", new Emitter.Listener() { + @Override + public void call(Object... args) { + JSONObject obj = (JSONObject)args[0]; + } +}); +``` + +Options are supplied as follows: + +```java +IO.Options opts = new IO.Options(); +opts.forceNew = true; +opts.reconnection = false; + +socket = IO.socket("http://localhost", opts); +``` + +You can supply query parameters with the `query` option. NB: if you don't want to reuse a cached socket instance when the query parameter changes, you should use the `forceNew` option, the use case might be if your app allows for a user to logout, and a new user to login again: + +```java +IO.Options opts = new IO.Options(); +opts.forceNew = true; +opts.query = "auth_token=" + authToken; +Socket socket = IO.socket("http://localhost", opts); +``` + +You can get a callback with `Ack` when the server received a message: + +```java +socket.emit("foo", "woot", new Ack() { + @Override + public void call(Object... args) {} +}); +``` + +And vice versa: + +```java +// ack from client to server +socket.on("foo", new Emitter.Listener() { + @Override + public void call(Object... args) { + Ack ack = (Ack) args[args.length - 1]; + ack.call(); + } +}); +``` + +SSL (HTTPS, WSS) settings: + +```java +// default settings for all sockets +IO.setDefaultSSLContext(mySSLContext); +IO.setDefaultHostnameVerifier(myHostnameVerifier); + +// set as an option +opts = new IO.Options(); +opts.sslContext = mySSLContext; +opts.hostnameVerifier = myHostnameVerifier; +socket = IO.socket("https://localhost", opts); +``` + +See the Javadoc for more details. + +http://socketio.github.io/socket.io-client-java/apidocs/ + +### Transports and HTTP Headers +You can access transports and their HTTP headers as follows. + +```java +// Called upon transport creation. +socket.io().on(Manager.EVENT_TRANSPORT, new Emitter.Listener() { + @Override + public void call(Object... args) { + Transport transport = (Transport)args[0]; + + transport.on(Transport.EVENT_REQUEST_HEADERS, new Emitter.Listener() { + @Override + public void call(Object... args) { + @SuppressWarnings("unchecked") + Map> headers = (Map>)args[0]; + // modify request headers + headers.put("Cookie", Arrays.asList("foo=1;")); + } + }); + + transport.on(Transport.EVENT_RESPONSE_HEADERS, new Emitter.Listener() { + @Override + public void call(Object... args) { + @SuppressWarnings("unchecked") + Map> headers = (Map>)args[0]; + // access response headers + String cookie = headers.get("Set-Cookie").get(0); + } + }); + } +}); +``` + +## Features +This library supports all of the features the JS client does, including events, options and upgrading transport. Android is fully supported. + +## License + +MIT + diff --git a/JUNK/socket.io-client-java-master/pom.xml b/JUNK/socket.io-client-java-master/pom.xml new file mode 100644 index 0000000..92e6d4e --- /dev/null +++ b/JUNK/socket.io-client-java-master/pom.xml @@ -0,0 +1,239 @@ + + 4.0.0 + io.socket + socket.io-client + 0.8.4-SNAPSHOT + jar + socket.io-client + Socket.IO Client Library for Java + https://github.com/socketio/socket.io-client-java + + + org.sonatype.oss + oss-parent + 7 + + + + github + + + + + The MIT License (MIT) + http://opensource.org/licenses/mit-license + repo + + + + + https://github.com/socketio/socket.io-client-java + scm:git:https://github.com/socketio/socket.io-client-java.git + scm:git:https://github.com/socketio/socket.io-client-java.git + HEAD + + + + + nkzawa + Naoyuki Kanezawa + naoyuki.kanezawa@gmail.com + + + + + + sonatype-oss-public + https://oss.sonatype.org/content/groups/public/ + + true + + + true + + + + + + 3.0.4 + + + + + io.socket + engine.io-client + 0.8.3 + + + org.json + json + 20090211 + + + junit + junit + 4.12 + test + + + org.hamcrest + hamcrest-library + 1.3 + test + + + org.skyscreamer + jsonassert + 1.3.0 + test + + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.7 + 1.7 + + -Xlint:unchecked + + true + true + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.19.1 + + -Dfile.encoding=UTF-8 + + + java.util.logging.config.file + ./src/test/resources/logging.properties + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-release-plugin + 2.5.3 + + true + false + release + deploy + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://oss.sonatype.org/ + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.5.0 + + + npm-install + process-test-resources + + exec + + + ./src/test/resources + npm + + install + + + + + + + org.codehaus.mojo + versions-maven-plugin + 2.3 + + + com.github.github + site-maven-plugin + 0.12 + + Creating site for ${project.version} + + + + + site + + site + + + + + + diff --git a/JUNK/socket.io-client-java-master/src/main/java/io/socket/backo/Backoff.java b/JUNK/socket.io-client-java-master/src/main/java/io/socket/backo/Backoff.java new file mode 100644 index 0000000..f519921 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/main/java/io/socket/backo/Backoff.java @@ -0,0 +1,56 @@ +package io.socket.backo; + +import java.math.BigDecimal; +import java.math.BigInteger; + +public class Backoff { + + private long ms = 100; + private long max = 10000; + private int factor = 2; + private double jitter; + private int attempts; + + public Backoff() {} + + public long duration() { + BigInteger ms = BigInteger.valueOf(this.ms) + .multiply(BigInteger.valueOf(this.factor).pow(this.attempts++)); + if (jitter != 0.0) { + double rand = Math.random(); + BigInteger deviation = BigDecimal.valueOf(rand) + .multiply(BigDecimal.valueOf(jitter)) + .multiply(new BigDecimal(ms)).toBigInteger(); + ms = (((int) Math.floor(rand * 10)) & 1) == 0 ? ms.subtract(deviation) : ms.add(deviation); + } + return ms.min(BigInteger.valueOf(this.max)).longValue(); + } + + public void reset() { + this.attempts = 0; + } + + public Backoff setMin(long min) { + this.ms = min; + return this; + } + + public Backoff setMax(long max) { + this.max = max; + return this; + } + + public Backoff setFactor(int factor) { + this.factor = factor; + return this; + } + + public Backoff setJitter(double jitter) { + this.jitter = jitter; + return this; + } + + public int getAttempts() { + return this.attempts; + } +} diff --git a/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Ack.java b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Ack.java new file mode 100644 index 0000000..8bd6a1e --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Ack.java @@ -0,0 +1,11 @@ +package io.socket.client; + +/** + * Acknowledgement. + */ +public interface Ack { + + public void call(Object... args); + +} + diff --git a/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/IO.java b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/IO.java new file mode 100644 index 0000000..06912a0 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/IO.java @@ -0,0 +1,98 @@ +package io.socket.client; + + +import io.socket.parser.Parser; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.SSLContext; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.util.concurrent.ConcurrentHashMap; +import java.util.logging.Logger; + + +public class IO { + + private static final Logger logger = Logger.getLogger(IO.class.getName()); + + private static final ConcurrentHashMap managers = new ConcurrentHashMap(); + + /** + * Protocol version. + */ + public static int protocol = Parser.protocol; + + public static void setDefaultSSLContext(SSLContext sslContext) { + Manager.defaultSSLContext = sslContext; + } + + public static void setDefaultHostnameVerifier(HostnameVerifier hostnameVerifier) { + Manager.defaultHostnameVerifier = hostnameVerifier; + } + + private IO() {} + + public static Socket socket(String uri) throws URISyntaxException { + return socket(uri, null); + } + + public static Socket socket(String uri, Options opts) throws URISyntaxException { + return socket(new URI(uri), opts); + } + + public static Socket socket(URI uri) { + return socket(uri, null); + } + + /** + * Initializes a {@link Socket} from an existing {@link Manager} for multiplexing. + * + * @param uri uri to connect. + * @param opts options for socket. + * @return {@link Socket} instance. + */ + public static Socket socket(URI uri, Options opts) { + if (opts == null) { + opts = new Options(); + } + + URL parsed = Url.parse(uri); + URI source; + try { + source = parsed.toURI(); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + String id = Url.extractId(parsed); + String path = parsed.getPath(); + boolean sameNamespace = managers.containsKey(id) + && managers.get(id).nsps.containsKey(path); + boolean newConnection = opts.forceNew || !opts.multiplex || sameNamespace; + Manager io; + + if (newConnection) { + logger.fine(String.format("ignoring socket cache for %s", source)); + io = new Manager(source, opts); + } else { + if (!managers.containsKey(id)) { + logger.fine(String.format("new io instance for %s", source)); + managers.putIfAbsent(id, new Manager(source, opts)); + } + io = managers.get(id); + } + + return io.socket(parsed.getPath()); + } + + + public static class Options extends Manager.Options { + + public boolean forceNew; + + /** + * Whether to enable multiplexing. Default is true. + */ + public boolean multiplex = true; + } +} diff --git a/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Manager.java b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Manager.java new file mode 100644 index 0000000..69a8909 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Manager.java @@ -0,0 +1,623 @@ +package io.socket.client; + +import io.socket.backo.Backoff; +import io.socket.emitter.Emitter; +import io.socket.parser.Packet; +import io.socket.parser.Parser; +import io.socket.thread.EventThread; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.SSLContext; +import java.net.URI; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Manager class represents a connection to a given Socket.IO server. + */ +public class Manager extends Emitter { + + private static final Logger logger = Logger.getLogger(Manager.class.getName()); + + /*package*/ enum ReadyState { + CLOSED, OPENING, OPEN + } + + /** + * Called on a successful connection. + */ + public static final String EVENT_OPEN = "open"; + + /** + * Called on a disconnection. + */ + public static final String EVENT_CLOSE = "close"; + + public static final String EVENT_PACKET = "packet"; + public static final String EVENT_ERROR = "error"; + + /** + * Called on a connection error. + */ + public static final String EVENT_CONNECT_ERROR = "connect_error"; + + /** + * Called on a connection timeout. + */ + public static final String EVENT_CONNECT_TIMEOUT = "connect_timeout"; + + /** + * Called on a successful reconnection. + */ + public static final String EVENT_RECONNECT = "reconnect"; + + /** + * Called on a reconnection attempt error. + */ + public static final String EVENT_RECONNECT_ERROR = "reconnect_error"; + + public static final String EVENT_RECONNECT_FAILED = "reconnect_failed"; + + public static final String EVENT_RECONNECT_ATTEMPT = "reconnect_attempt"; + + public static final String EVENT_RECONNECTING = "reconnecting"; + + public static final String EVENT_PING = "ping"; + + public static final String EVENT_PONG = "pong"; + + /** + * Called when a new transport is created. (experimental) + */ + public static final String EVENT_TRANSPORT = Engine.EVENT_TRANSPORT; + + /*package*/ static SSLContext defaultSSLContext; + /*package*/ static HostnameVerifier defaultHostnameVerifier; + + /*package*/ ReadyState readyState; + + private boolean _reconnection; + private boolean skipReconnect; + private boolean reconnecting; + private boolean encoding; + private int _reconnectionAttempts; + private long _reconnectionDelay; + private long _reconnectionDelayMax; + private double _randomizationFactor; + private Backoff backoff; + private long _timeout; + private Set connecting = new HashSet(); + private Date lastPing; + private URI uri; + private List packetBuffer; + private Queue subs; + private Options opts; + /*package*/ io.socket.engineio.client.Socket engine; + private Parser.Encoder encoder; + private Parser.Decoder decoder; + + /** + * This HashMap can be accessed from outside of EventThread. + */ + /*package*/ ConcurrentHashMap nsps; + + + public Manager() { + this(null, null); + } + + public Manager(URI uri) { + this(uri, null); + } + + public Manager(Options opts) { + this(null, opts); + } + + public Manager(URI uri, Options opts) { + if (opts == null) { + opts = new Options(); + } + if (opts.path == null) { + opts.path = "/socket.io"; + } + if (opts.sslContext == null) { + opts.sslContext = defaultSSLContext; + } + if (opts.hostnameVerifier == null) { + opts.hostnameVerifier = defaultHostnameVerifier; + } + this.opts = opts; + this.nsps = new ConcurrentHashMap(); + this.subs = new LinkedList(); + this.reconnection(opts.reconnection); + this.reconnectionAttempts(opts.reconnectionAttempts != 0 ? opts.reconnectionAttempts : Integer.MAX_VALUE); + this.reconnectionDelay(opts.reconnectionDelay != 0 ? opts.reconnectionDelay : 1000); + this.reconnectionDelayMax(opts.reconnectionDelayMax != 0 ? opts.reconnectionDelayMax : 5000); + this.randomizationFactor(opts.randomizationFactor != 0.0 ? opts.randomizationFactor : 0.5); + this.backoff = new Backoff() + .setMin(this.reconnectionDelay()) + .setMax(this.reconnectionDelayMax()) + .setJitter(this.randomizationFactor()); + this.timeout(opts.timeout); + this.readyState = ReadyState.CLOSED; + this.uri = uri; + this.encoding = false; + this.packetBuffer = new ArrayList(); + this.encoder = new Parser.Encoder(); + this.decoder = new Parser.Decoder(); + } + + private void emitAll(String event, Object... args) { + this.emit(event, args); + for (Socket socket : this.nsps.values()) { + socket.emit(event, args); + } + } + + /** + * Update `socket.id` of all sockets + */ + private void updateSocketIds() { + for (Socket socket : this.nsps.values()) { + socket.id = this.engine.id(); + } + } + + public boolean reconnection() { + return this._reconnection; + } + + public Manager reconnection(boolean v) { + this._reconnection = v; + return this; + } + + public int reconnectionAttempts() { + return this._reconnectionAttempts; + } + + public Manager reconnectionAttempts(int v) { + this._reconnectionAttempts = v; + return this; + } + + public final long reconnectionDelay() { + return this._reconnectionDelay; + } + + public Manager reconnectionDelay(long v) { + this._reconnectionDelay = v; + if (this.backoff != null) { + this.backoff.setMin(v); + } + return this; + } + + public final double randomizationFactor() { + return this._randomizationFactor; + } + + public Manager randomizationFactor(double v) { + this._randomizationFactor = v; + if (this.backoff != null) { + this.backoff.setJitter(v); + } + return this; + } + + public final long reconnectionDelayMax() { + return this._reconnectionDelayMax; + } + + public Manager reconnectionDelayMax(long v) { + this._reconnectionDelayMax = v; + if (this.backoff != null) { + this.backoff.setMax(v); + } + return this; + } + + public long timeout() { + return this._timeout; + } + + public Manager timeout(long v) { + this._timeout = v; + return this; + } + + private void maybeReconnectOnOpen() { + // Only try to reconnect if it's the first time we're connecting + if (!this.reconnecting && this._reconnection && this.backoff.getAttempts() == 0) { + this.reconnect(); + } + } + + public Manager open(){ + return open(null); + } + + /** + * Connects the client. + * + * @param fn callback. + * @return a reference to this object. + */ + public Manager open(final OpenCallback fn) { + EventThread.exec(new Runnable() { + @Override + public void run() { + logger.fine(String.format("readyState %s", Manager.this.readyState)); + if (Manager.this.readyState == ReadyState.OPEN || Manager.this.readyState == ReadyState.OPENING) return; + + logger.fine(String.format("opening %s", Manager.this.uri)); + Manager.this.engine = new Engine(Manager.this.uri, Manager.this.opts); + final io.socket.engineio.client.Socket socket = Manager.this.engine; + final Manager self = Manager.this; + Manager.this.readyState = ReadyState.OPENING; + Manager.this.skipReconnect = false; + + // propagate transport event. + socket.on(Engine.EVENT_TRANSPORT, new Listener() { + @Override + public void call(Object... args) { + self.emit(Manager.EVENT_TRANSPORT, args); + } + }); + + final On.Handle openSub = On.on(socket, Engine.EVENT_OPEN, new Listener() { + @Override + public void call(Object... objects) { + self.onopen(); + if (fn != null) fn.call(null); + } + }); + + On.Handle errorSub = On.on(socket, Engine.EVENT_ERROR, new Listener() { + @Override + public void call(Object... objects) { + Object data = objects.length > 0 ? objects[0] : null; + logger.fine("connect_error"); + self.cleanup(); + self.readyState = ReadyState.CLOSED; + self.emitAll(EVENT_CONNECT_ERROR, data); + if (fn != null) { + Exception err = new SocketIOException("Connection error", + data instanceof Exception ? (Exception) data : null); + fn.call(err); + } else { + // Only do this if there is no fn to handle the error + self.maybeReconnectOnOpen(); + } + } + }); + + if (Manager.this._timeout >= 0) { + final long timeout = Manager.this._timeout; + logger.fine(String.format("connection attempt will timeout after %d", timeout)); + + final Timer timer = new Timer(); + timer.schedule(new TimerTask() { + @Override + public void run() { + EventThread.exec(new Runnable() { + @Override + public void run() { + logger.fine(String.format("connect attempt timed out after %d", timeout)); + openSub.destroy(); + socket.close(); + socket.emit(Engine.EVENT_ERROR, new SocketIOException("timeout")); + self.emitAll(EVENT_CONNECT_TIMEOUT, timeout); + } + }); + } + }, timeout); + + Manager.this.subs.add(new On.Handle() { + @Override + public void destroy() { + timer.cancel(); + } + }); + } + + Manager.this.subs.add(openSub); + Manager.this.subs.add(errorSub); + + Manager.this.engine.open(); + } + }); + return this; + } + + private void onopen() { + logger.fine("open"); + + this.cleanup(); + + this.readyState = ReadyState.OPEN; + this.emit(EVENT_OPEN); + + final io.socket.engineio.client.Socket socket = this.engine; + this.subs.add(On.on(socket, Engine.EVENT_DATA, new Listener() { + @Override + public void call(Object... objects) { + Object data = objects[0]; + if (data instanceof String) { + Manager.this.ondata((String)data); + } else if (data instanceof byte[]) { + Manager.this.ondata((byte[])data); + } + } + })); + this.subs.add(On.on(socket, Engine.EVENT_PING, new Listener() { + @Override + public void call(Object... objects) { + Manager.this.onping(); + } + })); + this.subs.add(On.on(socket, Engine.EVENT_PONG, new Listener() { + @Override + public void call(Object... objects) { + Manager.this.onpong(); + } + })); + this.subs.add(On.on(socket, Engine.EVENT_ERROR, new Listener() { + @Override + public void call(Object... objects) { + Manager.this.onerror((Exception)objects[0]); + } + })); + this.subs.add(On.on(socket, Engine.EVENT_CLOSE, new Listener() { + @Override + public void call(Object... objects) { + Manager.this.onclose((String)objects[0]); + } + })); + this.subs.add(On.on(this.decoder, Parser.Decoder.EVENT_DECODED, new Listener() { + @Override + public void call(Object... objects) { + Manager.this.ondecoded((Packet) objects[0]); + } + })); + } + + private void onping() { + this.lastPing = new Date(); + this.emitAll(EVENT_PING); + } + + private void onpong() { + this.emitAll(EVENT_PONG, + null != this.lastPing ? new Date().getTime() - this.lastPing.getTime() : 0); + } + + private void ondata(String data) { + this.decoder.add(data); + } + + private void ondata(byte[] data) { + this.decoder.add(data); + } + + private void ondecoded(Packet packet) { + this.emit(EVENT_PACKET, packet); + } + + private void onerror(Exception err) { + logger.log(Level.FINE, "error", err); + this.emitAll(EVENT_ERROR, err); + } + + /** + * Initializes {@link Socket} instances for each namespaces. + * + * @param nsp namespace. + * @return a socket instance for the namespace. + */ + public Socket socket(String nsp) { + Socket socket = this.nsps.get(nsp); + if (socket == null) { + socket = new Socket(this, nsp); + Socket _socket = this.nsps.putIfAbsent(nsp, socket); + if (_socket != null) { + socket = _socket; + } else { + final Manager self = this; + final Socket s = socket; + socket.on(Socket.EVENT_CONNECTING, new Listener() { + @Override + public void call(Object... args) { + self.connecting.add(s); + } + }); + socket.on(Socket.EVENT_CONNECT, new Listener() { + @Override + public void call(Object... objects) { + s.id = self.engine.id(); + } + }); + } + } + return socket; + } + + /*package*/ void destroy(Socket socket) { + this.connecting.remove(socket); + if (!this.connecting.isEmpty()) return; + + this.close(); + } + + /*package*/ void packet(Packet packet) { + logger.fine(String.format("writing packet %s", packet)); + final Manager self = this; + + if (!self.encoding) { + self.encoding = true; + this.encoder.encode(packet, new Parser.Encoder.Callback() { + @Override + public void call(Object[] encodedPackets) { + for (Object packet : encodedPackets) { + if (packet instanceof String) { + self.engine.write((String)packet); + } else if (packet instanceof byte[]) { + self.engine.write((byte[])packet); + } + } + self.encoding = false; + self.processPacketQueue(); + } + }); + } else { + self.packetBuffer.add(packet); + } + } + + private void processPacketQueue() { + if (!this.packetBuffer.isEmpty() && !this.encoding) { + Packet pack = this.packetBuffer.remove(0); + this.packet(pack); + } + } + + private void cleanup() { + logger.fine("cleanup"); + + On.Handle sub; + while ((sub = this.subs.poll()) != null) sub.destroy(); + + this.packetBuffer.clear(); + this.encoding = false; + this.lastPing = null; + + this.decoder.destroy(); + } + + /*package*/ void close() { + logger.fine("disconnect"); + this.skipReconnect = true; + this.reconnecting = false; + if (this.readyState != ReadyState.OPEN) { + // `onclose` will not fire because + // an open event never happened + this.cleanup(); + } + this.backoff.reset(); + this.readyState = ReadyState.CLOSED; + if (this.engine != null) { + this.engine.close(); + } + } + + private void onclose(String reason) { + logger.fine("onclose"); + this.cleanup(); + this.backoff.reset(); + this.readyState = ReadyState.CLOSED; + this.emit(EVENT_CLOSE, reason); + + if (this._reconnection && !this.skipReconnect) { + this.reconnect(); + } + } + + private void reconnect() { + if (this.reconnecting || this.skipReconnect) return; + + final Manager self = this; + + if (this.backoff.getAttempts() >= this._reconnectionAttempts) { + logger.fine("reconnect failed"); + this.backoff.reset(); + this.emitAll(EVENT_RECONNECT_FAILED); + this.reconnecting = false; + } else { + long delay = this.backoff.duration(); + logger.fine(String.format("will wait %dms before reconnect attempt", delay)); + + this.reconnecting = true; + final Timer timer = new Timer(); + timer.schedule(new TimerTask() { + @Override + public void run() { + EventThread.exec(new Runnable() { + @Override + public void run() { + if (self.skipReconnect) return; + + logger.fine("attempting reconnect"); + int attempts = self.backoff.getAttempts(); + self.emitAll(EVENT_RECONNECT_ATTEMPT, attempts); + self.emitAll(EVENT_RECONNECTING, attempts); + + // check again for the case socket closed in above events + if (self.skipReconnect) return; + + self.open(new OpenCallback() { + @Override + public void call(Exception err) { + if (err != null) { + logger.fine("reconnect attempt error"); + self.reconnecting = false; + self.reconnect(); + self.emitAll(EVENT_RECONNECT_ERROR, err); + } else { + logger.fine("reconnect success"); + self.onreconnect(); + } + } + }); + } + }); + } + }, delay); + + this.subs.add(new On.Handle() { + @Override + public void destroy() { + timer.cancel(); + } + }); + } + } + + private void onreconnect() { + int attempts = this.backoff.getAttempts(); + this.reconnecting = false; + this.backoff.reset(); + this.updateSocketIds(); + this.emitAll(EVENT_RECONNECT, attempts); + } + + + public static interface OpenCallback { + + public void call(Exception err); + } + + + private static class Engine extends io.socket.engineio.client.Socket { + + Engine(URI uri, Options opts) { + super(uri, opts); + } + } + + public static class Options extends io.socket.engineio.client.Socket.Options { + + public boolean reconnection = true; + public int reconnectionAttempts; + public long reconnectionDelay; + public long reconnectionDelayMax; + public double randomizationFactor; + + /** + * Connection timeout (ms). Set -1 to disable. + */ + public long timeout = 20000; + } +} diff --git a/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/On.java b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/On.java new file mode 100644 index 0000000..b962f13 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/On.java @@ -0,0 +1,23 @@ +package io.socket.client; + +import io.socket.emitter.Emitter; + +public class On { + + private On() {} + + public static Handle on(final Emitter obj, final String ev, final Emitter.Listener fn) { + obj.on(ev, fn); + return new Handle() { + @Override + public void destroy() { + obj.off(ev, fn); + } + }; + } + + public static interface Handle { + + public void destroy(); + } +} diff --git a/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Socket.java b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Socket.java new file mode 100644 index 0000000..cd998f4 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Socket.java @@ -0,0 +1,492 @@ +package io.socket.client; + +import io.socket.emitter.Emitter; +import io.socket.hasbinary.HasBinary; +import io.socket.parser.Packet; +import io.socket.parser.Parser; +import io.socket.thread.EventThread; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.*; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * The socket class for Socket.IO Client. + */ +public class Socket extends Emitter { + + private static final Logger logger = Logger.getLogger(Socket.class.getName()); + + /** + * Called on a connection. + */ + public static final String EVENT_CONNECT = "connect"; + + public static final String EVENT_CONNECTING = "connecting"; + + /** + * Called on a disconnection. + */ + public static final String EVENT_DISCONNECT = "disconnect"; + + /** + * Called on a connection error. + * + *

Parameters:

+ *
    + *
  • (Exception) error data.
  • + *
+ */ + public static final String EVENT_ERROR = "error"; + + public static final String EVENT_MESSAGE = "message"; + + public static final String EVENT_CONNECT_ERROR = Manager.EVENT_CONNECT_ERROR; + + public static final String EVENT_CONNECT_TIMEOUT = Manager.EVENT_CONNECT_TIMEOUT; + + public static final String EVENT_RECONNECT = Manager.EVENT_RECONNECT; + + public static final String EVENT_RECONNECT_ERROR = Manager.EVENT_RECONNECT_ERROR; + + public static final String EVENT_RECONNECT_FAILED = Manager.EVENT_RECONNECT_FAILED; + + public static final String EVENT_RECONNECT_ATTEMPT = Manager.EVENT_RECONNECT_ATTEMPT; + + public static final String EVENT_RECONNECTING = Manager.EVENT_RECONNECTING; + + public static final String EVENT_PING = Manager.EVENT_PING; + + public static final String EVENT_PONG = Manager.EVENT_PONG; + + protected static Map events = new HashMap() {{ + put(EVENT_CONNECT, 1); + put(EVENT_CONNECT_ERROR, 1); + put(EVENT_CONNECT_TIMEOUT, 1); + put(EVENT_CONNECTING, 1); + put(EVENT_DISCONNECT, 1); + put(EVENT_ERROR, 1); + put(EVENT_RECONNECT, 1); + put(EVENT_RECONNECT_ATTEMPT, 1); + put(EVENT_RECONNECT_FAILED, 1); + put(EVENT_RECONNECT_ERROR, 1); + put(EVENT_RECONNECTING, 1); + put(EVENT_PING, 1); + put(EVENT_PONG, 1); + }}; + + /*package*/ String id; + + private volatile boolean connected; + private int ids; + private String nsp; + private Manager io; + private Map acks = new HashMap(); + private Queue subs; + private final Queue> receiveBuffer = new LinkedList>(); + private final Queue> sendBuffer = new LinkedList>(); + + public Socket(Manager io, String nsp) { + this.io = io; + this.nsp = nsp; + } + + private void subEvents() { + if (this.subs != null) return; + + final Manager io = Socket.this.io; + Socket.this.subs = new LinkedList() {{ + add(On.on(io, Manager.EVENT_OPEN, new Listener() { + @Override + public void call(Object... args) { + Socket.this.onopen(); + } + })); + add(On.on(io, Manager.EVENT_PACKET, new Listener() { + @Override + public void call(Object... args) { + Socket.this.onpacket((Packet) args[0]); + } + })); + add(On.on(io, Manager.EVENT_CLOSE, new Listener() { + @Override + public void call(Object... args) { + Socket.this.onclose(args.length > 0 ? (String) args[0] : null); + } + })); + }}; + } + + /** + * Connects the socket. + */ + public Socket open() { + EventThread.exec(new Runnable() { + @Override + public void run() { + if (Socket.this.connected) return; + + Socket.this.subEvents(); + Socket.this.io.open(); // ensure open + if (Manager.ReadyState.OPEN == Socket.this.io.readyState) Socket.this.onopen(); + Socket.this.emit(EVENT_CONNECTING); + } + }); + return this; + } + + /** + * Connects the socket. + */ + public Socket connect() { + return this.open(); + } + + /** + * Send messages. + * + * @param args data to send. + * @return a reference to this object. + */ + public Socket send(final Object... args) { + EventThread.exec(new Runnable() { + @Override + public void run() { + Socket.this.emit(EVENT_MESSAGE, args); + } + }); + return this; + } + + /** + * Emits an event. When you pass {@link Ack} at the last argument, then the acknowledge is done. + * + * @param event an event name. + * @param args data to send. + * @return a reference to this object. + */ + @Override + public Emitter emit(final String event, final Object... args) { + EventThread.exec(new Runnable() { + @Override + public void run() { + if (events.containsKey(event)) { + Socket.super.emit(event, args); + return; + } + + List _args = new ArrayList(args.length + 1); + _args.add(event); + _args.addAll(Arrays.asList(args)); + + JSONArray jsonArgs = new JSONArray(); + for (Object arg : _args) { + jsonArgs.put(arg); + } + int parserType = HasBinary.hasBinary(jsonArgs) ? Parser.BINARY_EVENT : Parser.EVENT; + Packet packet = new Packet(parserType, jsonArgs); + + if (_args.get(_args.size() - 1) instanceof Ack) { + logger.fine(String.format("emitting packet with ack id %d", Socket.this.ids)); + Socket.this.acks.put(Socket.this.ids, (Ack)_args.remove(_args.size() - 1)); + jsonArgs = remove(jsonArgs, jsonArgs.length() - 1); + packet.data = jsonArgs; + packet.id = Socket.this.ids++; + } + + if (Socket.this.connected) { + Socket.this.packet(packet); + } else { + Socket.this.sendBuffer.add(packet); + } + } + }); + return this; + } + + private static JSONArray remove(JSONArray a, int pos) { + JSONArray na = new JSONArray(); + for (int i = 0; i < a.length(); i++){ + if (i != pos) { + Object v; + try { + v = a.get(i); + } catch (JSONException e) { + v = null; + } + na.put(v); + } + } + return na; + } + + /** + * Emits an event with an acknowledge. + * + * @param event an event name + * @param args data to send. + * @param ack the acknowledgement to be called + * @return a reference to this object. + */ + public Emitter emit(final String event, final Object[] args, final Ack ack) { + EventThread.exec(new Runnable() { + @Override + public void run() { + List _args = new ArrayList() {{ + add(event); + if (args != null) { + addAll(Arrays.asList(args)); + } + }}; + + JSONArray jsonArgs = new JSONArray(); + for (Object _arg : _args) { + jsonArgs.put(_arg); + } + int parserType = HasBinary.hasBinary(jsonArgs) ? Parser.BINARY_EVENT : Parser.EVENT; + Packet packet = new Packet(parserType, jsonArgs); + + logger.fine(String.format("emitting packet with ack id %d", ids)); + Socket.this.acks.put(ids, ack); + packet.id = ids++; + + Socket.this.packet(packet); + } + }); + return this; + } + + private void packet(Packet packet) { + packet.nsp = this.nsp; + this.io.packet(packet); + } + + private void onopen() { + logger.fine("transport is open - connecting"); + + if (!"/".equals(this.nsp)) { + this.packet(new Packet(Parser.CONNECT)); + } + } + + private void onclose(String reason) { + logger.fine(String.format("close (%s)", reason)); + this.connected = false; + this.id = null; + this.emit(EVENT_DISCONNECT, reason); + } + + private void onpacket(Packet packet) { + if (!this.nsp.equals(packet.nsp)) return; + + switch (packet.type) { + case Parser.CONNECT: + this.onconnect(); + break; + + case Parser.EVENT: { + @SuppressWarnings("unchecked") + Packet p = (Packet) packet; + this.onevent(p); + break; + } + + case Parser.BINARY_EVENT: { + @SuppressWarnings("unchecked") + Packet p = (Packet) packet; + this.onevent(p); + break; + } + + case Parser.ACK: { + @SuppressWarnings("unchecked") + Packet p = (Packet) packet; + this.onack(p); + break; + } + + case Parser.BINARY_ACK: { + @SuppressWarnings("unchecked") + Packet p = (Packet) packet; + this.onack(p); + break; + } + + case Parser.DISCONNECT: + this.ondisconnect(); + break; + + case Parser.ERROR: + this.emit(EVENT_ERROR, packet.data); + break; + } + } + + private void onevent(Packet packet) { + List args = new ArrayList(Arrays.asList(toArray(packet.data))); + logger.fine(String.format("emitting event %s", args)); + + if (packet.id >= 0) { + logger.fine("attaching ack callback to event"); + args.add(this.ack(packet.id)); + } + + if (this.connected) { + if (args.isEmpty()) return; + String event = args.remove(0).toString(); + super.emit(event, args.toArray()); + } else { + this.receiveBuffer.add(args); + } + } + + private Ack ack(final int id) { + final Socket self = this; + final boolean[] sent = new boolean[] {false}; + return new Ack() { + @Override + public void call(final Object... args) { + EventThread.exec(new Runnable() { + @Override + public void run() { + if (sent[0]) return; + sent[0] = true; + logger.fine(String.format("sending ack %s", args.length != 0 ? args : null)); + + JSONArray jsonArgs = new JSONArray(); + for (Object arg : args) { + jsonArgs.put(arg); + } + + int type = HasBinary.hasBinary(jsonArgs) + ? Parser.BINARY_ACK : Parser.ACK; + Packet packet = new Packet(type, jsonArgs); + packet.id = id; + self.packet(packet); + } + }); + } + }; + } + + private void onack(Packet packet) { + Ack fn = this.acks.remove(packet.id); + if (fn != null) { + logger.fine(String.format("calling ack %s with %s", packet.id, packet.data)); + fn.call(toArray(packet.data)); + } else { + logger.fine(String.format("bad ack %s", packet.id)); + } + } + + private void onconnect() { + this.connected = true; + this.emit(EVENT_CONNECT); + this.emitBuffered(); + } + + private void emitBuffered() { + List data; + while ((data = this.receiveBuffer.poll()) != null) { + String event = (String)data.get(0); + super.emit(event, data.toArray()); + } + this.receiveBuffer.clear(); + + Packet packet; + while ((packet = this.sendBuffer.poll()) != null) { + this.packet(packet); + } + this.sendBuffer.clear(); + } + + private void ondisconnect() { + logger.fine(String.format("server disconnect (%s)", this.nsp)); + this.destroy(); + this.onclose("io server disconnect"); + } + + private void destroy() { + if (this.subs != null) { + // clean subscriptions to avoid reconnection + for (On.Handle sub : this.subs) { + sub.destroy(); + } + this.subs = null; + } + + this.io.destroy(this); + } + + /** + * Disconnects the socket. + * + * @return a reference to this object. + */ + public Socket close() { + EventThread.exec(new Runnable() { + @Override + public void run() { + if (Socket.this.connected) { + logger.fine(String.format("performing disconnect (%s)", Socket.this.nsp)); + Socket.this.packet(new Packet(Parser.DISCONNECT)); + } + + Socket.this.destroy(); + + if (Socket.this.connected) { + Socket.this.onclose("io client disconnect"); + } + } + }); + return this; + } + + /** + * Disconnects the socket. + * + * @return a reference to this object. + */ + public Socket disconnect() { + return this.close(); + } + + public Manager io() { + return this.io; + } + + public boolean connected() { + return this.connected; + } + + /** + * A property on the socket instance that is equal to the underlying engine.io socket id. + * + * The value is present once the socket has connected, is removed when the socket disconnects and is updated if the socket reconnects. + * + * @return a socket id + */ + public String id() { + return this.id; + } + + private static Object[] toArray(JSONArray array) { + int length = array.length(); + Object[] data = new Object[length]; + for (int i = 0; i < length; i++) { + Object v; + try { + v = array.get(i); + } catch (JSONException e) { + logger.log(Level.WARNING, "An error occured while retrieving data from JSONArray", e); + v = null; + } + data[i] = JSONObject.NULL.equals(v) ? null : v; + } + return data; + } +} + diff --git a/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/SocketIOException.java b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/SocketIOException.java new file mode 100644 index 0000000..5ad67dc --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/SocketIOException.java @@ -0,0 +1,20 @@ +package io.socket.client; + +public class SocketIOException extends Exception { + + public SocketIOException() { + super(); + } + + public SocketIOException(String message) { + super(message); + } + + public SocketIOException(String message, Throwable cause) { + super(message, cause); + } + + public SocketIOException(Throwable cause) { + super(cause); + } +} diff --git a/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Url.java b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Url.java new file mode 100644 index 0000000..b983018 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/main/java/io/socket/client/Url.java @@ -0,0 +1,73 @@ +package io.socket.client; + +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.util.regex.Pattern; + +public class Url { + + private static Pattern PATTERN_HTTP = Pattern.compile("^http|ws$"); + private static Pattern PATTERN_HTTPS = Pattern.compile("^(http|ws)s$"); + + private Url() {} + + public static URL parse(String uri) throws URISyntaxException { + return parse(new URI(uri)); + } + + public static URL parse(URI uri) { + String protocol = uri.getScheme(); + if (protocol == null || !protocol.matches("^https?|wss?$")) { + protocol = "https"; + } + + int port = uri.getPort(); + if (port == -1) { + if (PATTERN_HTTP.matcher(protocol).matches()) { + port = 80; + } else if (PATTERN_HTTPS.matcher(protocol).matches()) { + port = 443; + } + } + + String path = uri.getRawPath(); + if (path == null || path.length() == 0) { + path = "/"; + } + + String userInfo = uri.getRawUserInfo(); + String query = uri.getRawQuery(); + String fragment = uri.getRawFragment(); + try { + return new URL(protocol + "://" + + (userInfo != null ? userInfo + "@" : "") + + uri.getHost() + + (port != -1 ? ":" + port : "") + + path + + (query != null ? "?" + query : "") + + (fragment != null ? "#" + fragment : "")); + } catch (MalformedURLException e) { + throw new RuntimeException(e); + } + } + + public static String extractId(String url) throws MalformedURLException { + return extractId(new URL(url)); + } + + public static String extractId(URL url) { + String protocol = url.getProtocol(); + int port = url.getPort(); + if (port == -1) { + if (PATTERN_HTTP.matcher(protocol).matches()) { + port = 80; + } else if (PATTERN_HTTPS.matcher(protocol).matches()) { + port = 443; + } + } + return protocol + "://" + url.getHost() + ":" + port; + } + +} diff --git a/JUNK/socket.io-client-java-master/src/main/java/io/socket/hasbinary/HasBinary.java b/JUNK/socket.io-client-java-master/src/main/java/io/socket/hasbinary/HasBinary.java new file mode 100644 index 0000000..630be88 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/main/java/io/socket/hasbinary/HasBinary.java @@ -0,0 +1,63 @@ +package io.socket.hasbinary; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import java.util.logging.Level; +import java.util.logging.Logger; + +import java.util.Iterator; + +public class HasBinary { + + private static final Logger logger = Logger.getLogger(HasBinary.class.getName()); + + private HasBinary() {} + + public static boolean hasBinary(Object data) { + return _hasBinary(data); + } + + private static boolean _hasBinary(Object obj) { + if (obj == null) return false; + + if (obj instanceof byte[]) { + return true; + } + + if (obj instanceof JSONArray) { + JSONArray _obj = (JSONArray)obj; + int length = _obj.length(); + for (int i = 0; i < length; i++) { + Object v; + try { + v = _obj.isNull(i) ? null : _obj.get(i); + } catch (JSONException e) { + logger.log(Level.WARNING, "An error occured while retrieving data from JSONArray", e); + return false; + } + if (_hasBinary(v)) { + return true; + } + } + } else if (obj instanceof JSONObject) { + JSONObject _obj = (JSONObject)obj; + Iterator keys = _obj.keys(); + while (keys.hasNext()) { + String key = (String)keys.next(); + Object v; + try { + v = _obj.get(key); + } catch (JSONException e) { + logger.log(Level.WARNING, "An error occured while retrieving data from JSONObject", e); + return false; + } + if (_hasBinary(v)) { + return true; + } + } + } + + return false; + } +} diff --git a/JUNK/socket.io-client-java-master/src/main/java/io/socket/parser/Binary.java b/JUNK/socket.io-client-java-master/src/main/java/io/socket/parser/Binary.java new file mode 100644 index 0000000..b390da6 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/main/java/io/socket/parser/Binary.java @@ -0,0 +1,127 @@ +package io.socket.parser; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; + +public class Binary { + + private static final String KEY_PLACEHOLDER = "_placeholder"; + + private static final String KEY_NUM = "num"; + + private static final Logger logger = Logger.getLogger(Binary.class.getName()); + + @SuppressWarnings("unchecked") + public static DeconstructedPacket deconstructPacket(Packet packet) { + List buffers = new ArrayList(); + + packet.data = _deconstructPacket(packet.data, buffers); + packet.attachments = buffers.size(); + + DeconstructedPacket result = new DeconstructedPacket(); + result.packet = packet; + result.buffers = buffers.toArray(new byte[buffers.size()][]); + return result; + } + + private static Object _deconstructPacket(Object data, List buffers) { + if (data == null) return null; + + if (data instanceof byte[]) { + JSONObject placeholder = new JSONObject(); + try { + placeholder.put(KEY_PLACEHOLDER, true); + placeholder.put(KEY_NUM, buffers.size()); + } catch (JSONException e) { + logger.log(Level.WARNING, "An error occured while putting data to JSONObject", e); + return null; + } + buffers.add((byte[])data); + return placeholder; + } else if (data instanceof JSONArray) { + JSONArray newData = new JSONArray(); + JSONArray _data = (JSONArray)data; + int len = _data.length(); + for (int i = 0; i < len; i ++) { + try { + newData.put(i, _deconstructPacket(_data.get(i), buffers)); + } catch (JSONException e) { + logger.log(Level.WARNING, "An error occured while putting packet data to JSONObject", e); + return null; + } + } + return newData; + } else if (data instanceof JSONObject) { + JSONObject newData = new JSONObject(); + JSONObject _data = (JSONObject)data; + Iterator iterator = _data.keys(); + while (iterator.hasNext()) { + String key = (String)iterator.next(); + try { + newData.put(key, _deconstructPacket(_data.get(key), buffers)); + } catch (JSONException e) { + logger.log(Level.WARNING, "An error occured while putting data to JSONObject", e); + return null; + } + } + return newData; + } + return data; + } + + @SuppressWarnings("unchecked") + public static Packet reconstructPacket(Packet packet, byte[][] buffers) { + packet.data = _reconstructPacket(packet.data, buffers); + packet.attachments = -1; + return packet; + } + + private static Object _reconstructPacket(Object data, byte[][] buffers) { + if (data instanceof JSONArray) { + JSONArray _data = (JSONArray)data; + int len = _data.length(); + for (int i = 0; i < len; i ++) { + try { + _data.put(i, _reconstructPacket(_data.get(i), buffers)); + } catch (JSONException e) { + logger.log(Level.WARNING, "An error occured while putting packet data to JSONObject", e); + return null; + } + } + return _data; + } else if (data instanceof JSONObject) { + JSONObject _data = (JSONObject)data; + if (_data.optBoolean(KEY_PLACEHOLDER)) { + int num = _data.optInt(KEY_NUM, -1); + return num >= 0 && num < buffers.length ? buffers[num] : null; + } + Iterator iterator = _data.keys(); + while (iterator.hasNext()) { + String key = (String)iterator.next(); + try { + _data.put(key, _reconstructPacket(_data.get(key), buffers)); + } catch (JSONException e) { + logger.log(Level.WARNING, "An error occured while putting data to JSONObject", e); + return null; + } + } + return _data; + } + return data; + } + + public static class DeconstructedPacket { + + public Packet packet; + public byte[][] buffers; + } +} + + diff --git a/JUNK/socket.io-client-java-master/src/main/java/io/socket/parser/Packet.java b/JUNK/socket.io-client-java-master/src/main/java/io/socket/parser/Packet.java new file mode 100644 index 0000000..ae5e35b --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/main/java/io/socket/parser/Packet.java @@ -0,0 +1,22 @@ +package io.socket.parser; + + +public class Packet { + + public int type = -1; + public int id = -1; + public String nsp; + public T data; + public int attachments; + + public Packet() {} + + public Packet(int type) { + this.type = type; + } + + public Packet(int type, T data) { + this.type = type; + this.data = data; + } +} diff --git a/JUNK/socket.io-client-java-master/src/main/java/io/socket/parser/Parser.java b/JUNK/socket.io-client-java-master/src/main/java/io/socket/parser/Parser.java new file mode 100644 index 0000000..d37dbbd --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/main/java/io/socket/parser/Parser.java @@ -0,0 +1,277 @@ +package io.socket.parser; + +import io.socket.emitter.Emitter; +import org.json.JSONException; +import org.json.JSONTokener; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; + +public class Parser { + + private static final Logger logger = Logger.getLogger(Parser.class.getName()); + + /** + * Packet type `connect`. + */ + public static final int CONNECT = 0; + + /** + * Packet type `disconnect`. + */ + public static final int DISCONNECT = 1; + + /** + * Packet type `event`. + */ + public static final int EVENT = 2; + + /** + * Packet type `ack`. + */ + public static final int ACK = 3; + + /** + * Packet type `error`. + */ + public static final int ERROR = 4; + + /** + * Packet type `binary event`. + */ + public static final int BINARY_EVENT = 5; + + /** + * Packet type `binary ack`. + */ + public static final int BINARY_ACK = 6; + + public static int protocol = 4; + + /** + * Packet types. + */ + public static String[] types = new String[] { + "CONNECT", + "DISCONNECT", + "EVENT", + "ACK", + "ERROR", + "BINARY_EVENT", + "BINARY_ACK" + }; + + + private Parser() {} + + private static Packet error() { + return new Packet(ERROR, "parser error"); + } + + + public static class Encoder { + + public Encoder() {} + + public void encode(Packet obj, Callback callback) { + logger.fine(String.format("encoding packet %s", obj)); + + if (BINARY_EVENT == obj.type || BINARY_ACK == obj.type) { + encodeAsBinary(obj, callback); + } else { + String encoding = encodeAsString(obj); + callback.call(new String[] {encoding}); + } + } + + private String encodeAsString(Packet obj) { + StringBuilder str = new StringBuilder(); + boolean nsp = false; + + str.append(obj.type); + + if (BINARY_EVENT == obj.type || BINARY_ACK == obj.type) { + str.append(obj.attachments); + str.append("-"); + } + + if (obj.nsp != null && obj.nsp.length() != 0 && !"/".equals(obj.nsp)) { + nsp = true; + str.append(obj.nsp); + } + + if (obj.id >= 0) { + if (nsp) { + str.append(","); + nsp = false; + } + str.append(obj.id); + } + + if (obj.data != null) { + if (nsp) str.append(","); + str.append(obj.data); + } + + logger.fine(String.format("encoded %s as %s", obj, str)); + return str.toString(); + } + + private void encodeAsBinary(Packet obj, Callback callback) { + Binary.DeconstructedPacket deconstruction = Binary.deconstructPacket(obj); + String pack = encodeAsString(deconstruction.packet); + List buffers = new ArrayList(Arrays.asList(deconstruction.buffers)); + + buffers.add(0, pack); + callback.call(buffers.toArray()); + } + + public interface Callback { + + public void call(Object[] data); + } + } + + public static class Decoder extends Emitter { + + public static String EVENT_DECODED = "decoded"; + + /*package*/ BinaryReconstructor reconstructor; + + public Decoder() { + this.reconstructor = null; + } + + public void add(String obj) { + Packet packet = decodeString(obj); + if (BINARY_EVENT == packet.type || BINARY_ACK == packet.type) { + this.reconstructor = new BinaryReconstructor(packet); + + if (this.reconstructor.reconPack.attachments == 0) { + this.emit(EVENT_DECODED, packet); + } + } else { + this.emit(EVENT_DECODED, packet); + } + } + + public void add(byte[] obj) { + if (this.reconstructor == null) { + throw new RuntimeException("got binary data when not reconstructing a packet"); + } else { + Packet packet = this.reconstructor.takeBinaryData(obj); + if (packet != null) { + this.reconstructor = null; + this.emit(EVENT_DECODED, packet); + } + } + } + + private static Packet decodeString(String str) { + Packet p = new Packet(); + int i = 0; + int length = str.length(); + + p.type = Character.getNumericValue(str.charAt(0)); + if (p.type < 0 || p.type > types.length - 1) return error(); + + if (BINARY_EVENT == p.type || BINARY_ACK == p.type) { + if (!str.contains("-") || length <= i + 1) return error(); + StringBuilder attachments = new StringBuilder(); + while (str.charAt(++i) != '-') { + attachments.append(str.charAt(i)); + } + p.attachments = Integer.parseInt(attachments.toString()); + } + + if (length > i + 1 && '/' == str.charAt(i + 1)) { + StringBuilder nsp = new StringBuilder(); + while (true) { + ++i; + char c = str.charAt(i); + if (',' == c) break; + nsp.append(c); + if (i + 1 == length) break; + } + p.nsp = nsp.toString(); + } else { + p.nsp = "/"; + } + + if (length > i + 1){ + Character next = str.charAt(i + 1); + if (Character.getNumericValue(next) > -1) { + StringBuilder id = new StringBuilder(); + while (true) { + ++i; + char c = str.charAt(i); + if (Character.getNumericValue(c) < 0) { + --i; + break; + } + id.append(c); + if (i + 1 == length) break; + } + try { + p.id = Integer.parseInt(id.toString()); + } catch (NumberFormatException e){ + return error(); + } + } + } + + if (length > i + 1){ + try { + str.charAt(++i); + p.data = new JSONTokener(str.substring(i)).nextValue(); + } catch (JSONException e) { + logger.log(Level.WARNING, "An error occured while retrieving data from JSONTokener", e); + return error(); + } + } + + logger.fine(String.format("decoded %s as %s", str, p)); + return p; + } + + public void destroy() { + if (this.reconstructor != null) { + this.reconstructor.finishReconstruction(); + } + } + } + + + /*package*/ static class BinaryReconstructor { + + public Packet reconPack; + + /*package*/ List buffers; + + BinaryReconstructor(Packet packet) { + this.reconPack = packet; + this.buffers = new ArrayList(); + } + + public Packet takeBinaryData(byte[] binData) { + this.buffers.add(binData); + if (this.buffers.size() == this.reconPack.attachments) { + Packet packet = Binary.reconstructPacket(this.reconPack, + this.buffers.toArray(new byte[this.buffers.size()][])); + this.finishReconstruction(); + return packet; + } + return null; + } + + public void finishReconstruction () { + this.reconPack = null; + this.buffers = new ArrayList(); + } + } +} + + diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/backo/BackoffTest.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/backo/BackoffTest.java new file mode 100644 index 0000000..a268829 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/backo/BackoffTest.java @@ -0,0 +1,47 @@ +package io.socket.backo; + +import org.junit.Test; + +import java.math.BigDecimal; +import java.math.BigInteger; + +import static org.junit.Assert.assertTrue; + +public class BackoffTest { + + @Test + public void durationShouldIncreaseTheBackoff() { + Backoff b = new Backoff(); + + assertTrue(100 == b.duration()); + assertTrue(200 == b.duration()); + assertTrue(400 == b.duration()); + assertTrue(800 == b.duration()); + + b.reset(); + assertTrue(100 == b.duration()); + assertTrue(200 == b.duration()); + } + + @Test + public void durationOverflow() { + for (int i = 0; i < 10; i++) { + Backoff b = new Backoff(); + b.setMin(100); + b.setMax(10000); + b.setJitter(0.5); + + // repeats to make it overflow (a long can have 2 ** 63 - 1) + for (int j = 0; j < 100; j++) { + BigInteger ms = BigInteger.valueOf(100).multiply(BigInteger.valueOf(2).pow(j)); + BigInteger deviation = new BigDecimal(ms).multiply(BigDecimal.valueOf(0.5)).toBigInteger(); + BigInteger duration = BigInteger.valueOf(b.duration()); + + BigInteger min = ms.subtract(deviation).min(BigInteger.valueOf(10000)); + BigInteger max = ms.add(deviation).min(BigInteger.valueOf(10001)); + assertTrue(min + " <= " + duration + " < " + max, + min.compareTo(duration) <= 0 && max.compareTo(duration) == 1); + } + } + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/Connection.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/Connection.java new file mode 100644 index 0000000..60d3078 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/Connection.java @@ -0,0 +1,123 @@ +package io.socket.client; + +import org.junit.After; +import org.junit.Before; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.*; +import java.util.logging.Logger; + +public abstract class Connection { + + private static final Logger logger = Logger.getLogger(Connection.class.getName()); + + final static int TIMEOUT = 7000; + final static int PORT = 3000; + + private Process serverProcess; + private ExecutorService serverService; + private Future serverOutput; + private Future serverError; + + @Before + public void startServer() throws IOException, InterruptedException { + logger.fine("Starting server ..."); + + final CountDownLatch latch = new CountDownLatch(1); + serverProcess = Runtime.getRuntime().exec( + String.format("node src/test/resources/server.js %s", nsp()), createEnv()); + serverService = Executors.newCachedThreadPool(); + serverOutput = serverService.submit(new Runnable() { + @Override + public void run() { + BufferedReader reader = new BufferedReader( + new InputStreamReader(serverProcess.getInputStream())); + String line; + try { + line = reader.readLine(); + latch.countDown(); + do { + logger.fine("SERVER OUT: " + line); + } while ((line = reader.readLine()) != null); + } catch (IOException e) { + logger.warning(e.getMessage()); + } + } + }); + serverError = serverService.submit(new Runnable() { + @Override + public void run() { + BufferedReader reader = new BufferedReader( + new InputStreamReader(serverProcess.getErrorStream())); + String line; + try { + while ((line = reader.readLine()) != null) { + logger.fine("SERVER ERR: " + line); + } + } catch (IOException e) { + logger.warning(e.getMessage()); + } + } + }); + latch.await(3000, TimeUnit.MILLISECONDS); + } + + @After + public void stopServer() throws InterruptedException { + logger.fine("Stopping server ..."); + serverProcess.destroy(); + serverOutput.cancel(false); + serverError.cancel(false); + serverService.shutdown(); + serverService.awaitTermination(3000, TimeUnit.MILLISECONDS); + } + + Socket client() throws URISyntaxException { + return client(createOptions()); + } + + Socket client(String path) throws URISyntaxException { + return IO.socket(path, createOptions()); + } + + Socket client(IO.Options opts) throws URISyntaxException { + return client(nsp(), opts); + } + + Socket client(String path, IO.Options opts) throws URISyntaxException { + return IO.socket(uri() + path, opts); + } + + String uri() { + return "http://localhost:" + PORT; + } + + String nsp() { + return "/"; + } + + IO.Options createOptions() { + IO.Options opts = new IO.Options(); + opts.forceNew = true; + return opts; + } + + String[] createEnv() { + Map env = new HashMap(System.getenv()); + env.put("DEBUG", "socket.io:*"); + env.put("PORT", String.valueOf(PORT)); + String[] _env = new String[env.size()]; + int i = 0; + for (String key : env.keySet()) { + _env[i] = key + "=" + env.get(key); + i++; + } + return _env; + + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ConnectionTest.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ConnectionTest.java new file mode 100644 index 0000000..40a1d24 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ConnectionTest.java @@ -0,0 +1,945 @@ +package io.socket.client; + +import io.socket.emitter.Emitter; +import org.json.JSONException; +import org.json.JSONObject; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.charset.Charset; +import java.util.Date; +import java.util.Timer; +import java.util.TimerTask; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; + +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.not; +import static org.junit.Assert.assertThat; + +@RunWith(JUnit4.class) +public class ConnectionTest extends Connection { + + private Socket socket; + + @Test(timeout = TIMEOUT) + public void connectToLocalhost() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.emit("echo"); + socket.on("echoBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer("done"); + } + }); + } + }); + socket.connect(); + values.take(); + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void startTwoConnectionsWithSamePath() throws URISyntaxException, InterruptedException { + Socket s1 = client("/"); + Socket s2 = client("/"); + + assertThat(s1.io(), not(equalTo(s2.io()))); + s1.close(); + s2.close(); + } + + @Test(timeout = TIMEOUT) + public void startTwoConnectionsWithSamePathAndDifferentQuerystrings() throws URISyntaxException, InterruptedException { + Socket s1 = client("/?woot"); + Socket s2 = client("/"); + + assertThat(s1.io(), not(equalTo(s2.io()))); + s1.close(); + s2.close(); + } + + @Test(timeout = TIMEOUT) + public void workWithAcks() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.emit("callAck"); + socket.on("ack", new Emitter.Listener() { + @Override + public void call(Object... args) { + Ack fn = (Ack) args[0]; + JSONObject data = new JSONObject(); + try { + data.put("test", true); + } catch (JSONException e) { + throw new AssertionError(e); + } + fn.call(5, data); + } + }); + socket.on("ackBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + JSONObject data = (JSONObject)args[1]; + try { + if ((Integer)args[0] == 5 && data.getBoolean("test")) { + values.offer("done"); + } + } catch (JSONException e) { + throw new AssertionError(e); + } + } + }); + } + }); + socket.connect(); + values.take(); + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void receiveDateWithAck() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + try { + socket.emit("getAckDate", new JSONObject("{test: true}"), new Ack() { + @Override + public void call(Object... args) { + values.offer(args[0]); + } + }); + } catch (JSONException e) { + throw new AssertionError(e); + } + } + }); + socket.connect(); + assertThat(values.take(), instanceOf(String.class)); + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void sendBinaryAck() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + final byte[] buf = "huehue".getBytes(Charset.forName("UTF-8")); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.emit("callAckBinary"); + socket.on("ack", new Emitter.Listener() { + @Override + public void call(Object... args) { + Ack fn = (Ack) args[0]; + fn.call(buf); + } + }); + + socket.on("ackBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + byte[] data = (byte[])args[0]; + values.offer(data); + } + }); + } + }); + socket.connect(); + Assert.assertArrayEquals(buf, (byte[])values.take()); + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void receiveBinaryDataWithAck() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + final byte[] buf = "huehue".getBytes(Charset.forName("UTF-8")); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.emit("getAckBinary", "", new Ack() { + + @Override + public void call(Object... args) { + values.offer(args[0]); + } + }); + } + }); + socket.connect(); + Assert.assertArrayEquals(buf, (byte[])values.take()); + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void workWithFalse() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.emit("echo", false); + socket.on("echoBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args[0]); + } + }); + } + }); + socket.connect(); + assertThat((Boolean)values.take(), is(false)); + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void receiveUTF8MultibyteCharacters() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + final String[] correct = new String[] { + "てすと", + "Я Б Г Д Ж Й", + "Ä ä Ü ü ß", + "utf8 — string", + "utf8 — string" + }; + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.on("echoBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args[0]); + } + }); + for (String data : correct) { + socket.emit("echo", data); + } + } + }); + socket.connect(); + for (String expected : correct) { + assertThat((String)values.take(), is(expected)); + } + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void connectToNamespaceAfterConnectionEstablished() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + final Manager manager = new Manager(new URI(uri())); + socket = manager.socket("/"); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + final Socket foo = manager.socket("/foo"); + foo.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + foo.close(); + socket.close(); + manager.close(); + values.offer("done"); + } + }); + foo.open(); + } + }); + socket.open(); + values.take(); + } + + @Test(timeout = TIMEOUT) + public void connectToNamespaceAfterConnectionGetsClosed() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + final Manager manager = new Manager(new URI(uri())); + socket = manager.socket("/"); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.close(); + } + }).on(Socket.EVENT_DISCONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + final Socket foo = manager.socket("/foo"); + foo.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + foo.close(); + manager.close(); + values.offer("done"); + } + }); + foo.open(); + } + }); + socket.open(); + values.take(); + } + + @Test(timeout = TIMEOUT) + public void reconnectByDefault() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.io().on(Manager.EVENT_RECONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.close(); + values.offer("done"); + } + }); + socket.open(); + new Timer().schedule(new TimerTask() { + @Override + public void run() { + socket.io().engine.close(); + } + }, 500); + values.take(); + } + + @Test(timeout = TIMEOUT) + public void reconnectManually() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.once(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.disconnect(); + } + }).once(Socket.EVENT_DISCONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.once(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.disconnect(); + values.offer("done"); + } + }); + socket.connect(); + } + }); + socket.connect(); + values.take(); + } + + @Test(timeout = TIMEOUT) + public void reconnectAutomaticallyAfterReconnectingManually() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.once(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.disconnect(); + } + }).once(Socket.EVENT_DISCONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.on(Socket.EVENT_RECONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.disconnect(); + values.offer("done"); + } + }); + socket.connect(); + new Timer().schedule(new TimerTask() { + @Override + public void run() { + socket.io().engine.close(); + } + }, 500); + } + }); + socket.connect(); + values.take(); + } + + @Test(timeout = TIMEOUT) + public void attemptReconnectsAfterAFailedReconnect() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + IO.Options opts = createOptions(); + opts.reconnection = true; + opts.timeout = 0; + opts.reconnectionAttempts = 2; + opts.reconnectionDelay = 10; + final Manager manager = new Manager(new URI(uri()), opts); + socket = manager.socket("/timeout"); + socket.once(Socket.EVENT_RECONNECT_FAILED, new Emitter.Listener() { + @Override + public void call(Object... args) { + final int[] reconnects = new int[] {0}; + Emitter.Listener reconnectCb = new Emitter.Listener() { + @Override + public void call(Object... args) { + reconnects[0]++; + } + }; + + manager.on(Manager.EVENT_RECONNECT_ATTEMPT, reconnectCb); + manager.on(Manager.EVENT_RECONNECT_FAILED, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(reconnects[0]); + } + }); + socket.connect(); + } + }); + socket.connect(); + assertThat((Integer)values.take(), is(2)); + socket.close(); + manager.close(); + } + + @Test(timeout = TIMEOUT) + public void reconnectDelayShouldIncreaseEveryTime() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + IO.Options opts = createOptions(); + opts.reconnection = true; + opts.timeout = 0; + opts.reconnectionAttempts = 3; + opts.reconnectionDelay = 100; + opts.randomizationFactor = 0.2; + final Manager manager = new Manager(new URI(uri()), opts); + socket = manager.socket("/timeout"); + + final int[] reconnects = new int[] {0}; + final boolean[] increasingDelay = new boolean[] {true}; + final long[] startTime = new long[] {0}; + final long[] prevDelay = new long[] {0}; + + socket.on(Socket.EVENT_CONNECT_ERROR, new Emitter.Listener() { + @Override + public void call(Object... args) { + startTime[0] = new Date().getTime(); + } + }); + socket.on(Socket.EVENT_RECONNECT_ATTEMPT, new Emitter.Listener() { + @Override + public void call(Object... args) { + reconnects[0]++; + long currentTime = new Date().getTime(); + long delay = currentTime - startTime[0]; + if (delay <= prevDelay[0]) { + increasingDelay[0] = false; + } + prevDelay[0] = delay; + } + }); + socket.on(Socket.EVENT_RECONNECT_FAILED, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(true); + } + }); + + socket.connect(); + values.take(); + assertThat(reconnects[0], is(3)); + assertThat(increasingDelay[0], is(true)); + socket.close(); + manager.close(); + } + + @Test(timeout = TIMEOUT) + public void reconnectEventFireInSocket() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.on(Socket.EVENT_RECONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + values.offer("done"); + } + }); + socket.open(); + new Timer().schedule(new TimerTask() { + @Override + public void run() { + socket.io().engine.close(); + } + }, 500); + values.take(); + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void notReconnectWhenForceClosed() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + IO.Options opts = createOptions(); + opts.timeout = 0; + opts.reconnectionDelay = 10; + socket = IO.socket(uri() + "/invalid", opts); + socket.on(Socket.EVENT_CONNECT_ERROR, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.on(Socket.EVENT_RECONNECT_ATTEMPT, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(false); + } + }); + socket.disconnect(); + new Timer().schedule(new TimerTask() { + @Override + public void run() { + values.offer(true); + } + }, 500); + } + }); + socket.connect(); + assertThat((Boolean)values.take(), is(true)); + } + + @Test(timeout = TIMEOUT) + public void stopReconnectingWhenForceClosed() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + IO.Options opts = createOptions(); + opts.timeout = 0; + opts.reconnectionDelay = 10; + socket = IO.socket(uri() + "/invalid", opts); + socket.once(Socket.EVENT_RECONNECT_ATTEMPT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.on(Socket.EVENT_RECONNECT_ATTEMPT, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(false); + } + }); + socket.disconnect(); + // set a timer to let reconnection possibly fire + new Timer().schedule(new TimerTask() { + @Override + public void run() { + values.offer(true); + } + }, 500); + } + }); + socket.connect(); + assertThat((Boolean) values.take(), is(true)); + } + + @Test(timeout = TIMEOUT) + public void reconnectAfterStoppingReconnection() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + IO.Options opts = createOptions(); + opts.forceNew = true; + opts.timeout = 0; + opts.reconnectionDelay = 10; + socket = client("/invalid", opts); + socket.once(Socket.EVENT_RECONNECT_ATTEMPT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.once(Socket.EVENT_RECONNECT_ATTEMPT, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer("done"); + } + }); + socket.disconnect(); + socket.connect(); + } + }); + socket.connect(); + values.take(); + socket.disconnect(); + } + + @Test(timeout = TIMEOUT) + public void stopReconnectingOnASocketAndKeepToReconnectOnAnother() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + final Manager manager = new Manager(new URI(uri())); + final Socket socket1 = manager.socket("/"); + final Socket socket2 = manager.socket("/asd"); + + manager.on(Manager.EVENT_RECONNECT_ATTEMPT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket1.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(false); + } + }); + socket2.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + new Timer().schedule(new TimerTask() { + @Override + public void run() { + socket2.disconnect(); + manager.close(); + values.offer(true); + } + }, 500); + } + }); + socket1.disconnect(); + } + }); + + socket1.connect(); + socket2.connect(); + + new Timer().schedule(new TimerTask() { + @Override + public void run() { + manager.engine.close(); + } + }, 1000); + + assertThat((Boolean) values.take(), is(true)); + } + + @Test(timeout = TIMEOUT) + public void connectWhileDisconnectingAnotherSocket() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + final Manager manager = new Manager(new URI(uri())); + final Socket socket1 = manager.socket("/foo"); + socket1.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + final Socket socket2 = manager.socket("/asd"); + socket2.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer("done"); + socket2.disconnect(); + } + }); + socket2.open(); + socket1.disconnect(); + } + }); + + socket1.open(); + values.take(); + manager.close(); + } + + @Test(timeout = TIMEOUT) + public void tryToReconnectTwiceAndFailWithIncorrectAddress() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + IO.Options opts = new IO.Options(); + opts.reconnection = true; + opts.reconnectionAttempts = 2; + opts.reconnectionDelay = 10; + final Manager manager = new Manager(new URI("http://localhost:3940"), opts); + socket = manager.socket("/asd"); + final int[] reconnects = new int[] {0}; + Emitter.Listener cb = new Emitter.Listener() { + @Override + public void call(Object... objects) { + reconnects[0]++; + } + }; + + manager.on(Manager.EVENT_RECONNECT_ATTEMPT, cb); + + manager.on(Manager.EVENT_RECONNECT_FAILED, new Emitter.Listener() { + @Override + public void call(Object... objects) { + values.offer(reconnects[0]); + } + }); + + socket.open(); + assertThat((Integer)values.take(), is(2)); + socket.close(); + manager.close(); + } + + @Test(timeout = TIMEOUT) + public void tryToReconnectTwiceAndFailWithImmediateTimeout() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + IO.Options opts = new IO.Options(); + opts.reconnection = true; + opts.timeout = 0; + opts.reconnectionAttempts = 2; + opts.reconnectionDelay = 10; + final Manager manager = new Manager(new URI(uri()), opts); + + final int[] reconnects = new int[] {0}; + Emitter.Listener reconnectCb = new Emitter.Listener() { + @Override + public void call(Object... objects) { + reconnects[0]++; + } + }; + + manager.on(Manager.EVENT_RECONNECT_ATTEMPT, reconnectCb); + manager.on(Manager.EVENT_RECONNECT_FAILED, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.close(); + manager.close(); + values.offer(reconnects[0]); + } + }); + + socket = manager.socket("/timeout"); + socket.open(); + assertThat((Integer)values.take(), is(2)); + } + + @Test(timeout = TIMEOUT) + public void notTryToReconnectWithIncorrectPortWhenReconnectionDisabled() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + IO.Options opts = new IO.Options(); + opts.reconnection = false; + final Manager manager = new Manager(new URI("http://localhost:9823"), opts); + Emitter.Listener cb = new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.close(); + throw new RuntimeException(); + } + }; + manager.on(Manager.EVENT_RECONNECT_ATTEMPT, cb); + manager.on(Manager.EVENT_CONNECT_ERROR, new Emitter.Listener() { + @Override + public void call(Object... objects) { + Timer timer = new Timer(); + timer.schedule(new TimerTask() { + @Override + public void run() { + socket.close(); + manager.close(); + values.offer("done"); + } + }, 1000); + } + }); + + socket = manager.socket("/invalid"); + socket.open(); + values.take(); + } + + @Test(timeout = TIMEOUT) + public void fireReconnectEventsOnSocket() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + Manager.Options opts = new Manager.Options(); + opts.reconnection = true; + opts.timeout = 0; + opts.reconnectionAttempts = 2; + opts.reconnectionDelay = 10; + final Manager manager = new Manager(new URI(uri()), opts); + socket = manager.socket("/timeout_socket"); + + final int[] reconnects = new int[] {0}; + Emitter.Listener reconnectCb = new Emitter.Listener() { + @Override + public void call(Object... args) { + reconnects[0]++; + values.offer(args[0]); + } + }; + + socket.on(Socket.EVENT_RECONNECT_ATTEMPT, reconnectCb); + socket.on(Socket.EVENT_RECONNECT_FAILED, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.close(); + manager.close(); + values.offer(reconnects[0]); + } + }); + socket.open(); + assertThat((Integer)values.take(), is(reconnects[0])); + assertThat((Integer)values.take(), is(2)); + } + + @Test(timeout = TIMEOUT) + public void fireReconnectingWithAttemptsNumberWhenReconnectingTwice() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + Manager.Options opts = new Manager.Options(); + opts.reconnection = true; + opts.timeout = 0; + opts.reconnectionAttempts = 2; + opts.reconnectionDelay = 10; + final Manager manager = new Manager(new URI(uri()), opts); + socket = manager.socket("/timeout_socket"); + + final int[] reconnects = new int[] {0}; + Emitter.Listener reconnectCb = new Emitter.Listener() { + @Override + public void call(Object... args) { + reconnects[0]++; + values.offer(args[0]); + } + }; + + socket.on(Socket.EVENT_RECONNECTING, reconnectCb); + socket.on(Socket.EVENT_RECONNECT_FAILED, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.close(); + manager.close(); + values.offer(reconnects[0]); + } + }); + socket.open(); + assertThat((Integer)values.take(), is(reconnects[0])); + assertThat((Integer)values.take(), is(2)); + } + + @Test(timeout = TIMEOUT) + public void emitDateAsString() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.emit("echo", new Date()); + socket.on("echoBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.close(); + values.offer(args[0]); + } + }); + } + }); + socket.connect(); + assertThat(values.take(), instanceOf(String.class)); + } + + @Test(timeout = TIMEOUT) + public void emitDateInObject() throws URISyntaxException, InterruptedException, JSONException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + JSONObject data = new JSONObject(); + try { + data.put("date", new Date()); + } catch (JSONException e) { + throw new AssertionError(e); + } + socket.emit("echo", data); + socket.on("echoBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args[0]); + } + }); + } + }); + socket.connect(); + Object data = values.take(); + assertThat(data, instanceOf(JSONObject.class)); + assertThat(((JSONObject)data).get("date"), instanceOf(String.class)); + socket.close(); + } + + + @Test(timeout = TIMEOUT) + public void sendAndGetBinaryData() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + final byte[] buf = "asdfasdf".getBytes(Charset.forName("UTF-8")); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.emit("echo", buf); + socket.on("echoBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args[0]); + } + }); + } + }); + socket.open(); + assertThat((byte[])values.take(), is(buf)); + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void sendBinaryDataMixedWithJson() throws URISyntaxException, InterruptedException, JSONException { + final BlockingQueue values = new LinkedBlockingQueue(); + final byte[] buf = "howdy".getBytes(Charset.forName("UTF-8")); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + JSONObject data = new JSONObject(); + try { + data.put("hello", "lol"); + data.put("message", buf); + data.put("goodbye", "gotcha"); + } catch (JSONException e) { + throw new AssertionError(e); + } + socket.emit("echo", data); + socket.on("echoBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args[0]); + } + }); + } + }); + socket.open(); + JSONObject a = (JSONObject)values.take(); + assertThat(a.getString("hello"), is("lol")); + assertThat((byte[])a.get("message"), is(buf)); + assertThat(a.getString("goodbye"), is("gotcha")); + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void sendEventsWithByteArraysInTheCorrectOrder() throws Exception { + final BlockingQueue values = new LinkedBlockingQueue(); + final byte[] buf = "abuff1".getBytes(Charset.forName("UTF-8")); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.emit("echo", buf); + socket.emit("echo", "please arrive second"); + + socket.on("echoBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args[0]); + } + }); + } + }); + socket.open(); + assertThat((byte[])values.take(), is(buf)); + assertThat((String)values.take(), is("please arrive second")); + socket.close(); + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ExecutionTest.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ExecutionTest.java new file mode 100644 index 0000000..d6db39a --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ExecutionTest.java @@ -0,0 +1,49 @@ +package io.socket.client; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.logging.Logger; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +@RunWith(JUnit4.class) +public class ExecutionTest extends Connection { + + private static final Logger logger = Logger.getLogger(ExecutionTest.class.getName()); + + final static int TIMEOUT = 60 * 1000; + + @Test(timeout = TIMEOUT) + public void execConnection() throws InterruptedException, IOException { + exec("io.socket.client.executions.Connection"); + } + + @Test(timeout = TIMEOUT) + public void execConnectionFailure() throws InterruptedException, IOException { + exec("io.socket.client.executions.ConnectionFailure"); + } + + @Test(timeout = TIMEOUT) + public void execImmediateClose() throws InterruptedException, IOException { + exec("io.socket.client.executions.ImmediateClose"); + } + + private void exec(String mainClass) throws InterruptedException, IOException { + Process process = Runtime.getRuntime().exec(String.format("mvn --quiet exec:java" + + " -Dexec.mainClass=%s -Dexec.classpathScope=test", mainClass), createEnv()); + BufferedReader input = new BufferedReader( + new InputStreamReader(process.getInputStream())); + String line; + while ((line = input.readLine()) != null) { + logger.fine("EXEC OUT: " + line); + } + process.waitFor(); + assertThat(process.exitValue(), is(0)); + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/SSLConnectionTest.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/SSLConnectionTest.java new file mode 100644 index 0000000..db3daac --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/SSLConnectionTest.java @@ -0,0 +1,118 @@ +package io.socket.client; + +import io.socket.emitter.Emitter; +import org.junit.After; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManagerFactory; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; + +@RunWith(JUnit4.class) +public class SSLConnectionTest extends Connection { + + // for test on localhost + static HostnameVerifier hostnameVerifier = new javax.net.ssl.HostnameVerifier(){ + public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) { + return hostname.equals("localhost"); + } + }; + + private Socket socket; + + @Override + String uri() { + return "https://localhost:" + PORT; + } + + @Override + IO.Options createOptions() { + IO.Options opts = super.createOptions(); + opts.secure = true; + return opts; + } + + @Override + String[] createEnv() { + return new String[] {"DEBUG=socket.io:*", "PORT=" + PORT, "SSL=1"}; + } + + SSLContext createSSLContext() throws GeneralSecurityException, IOException { + KeyStore ks = KeyStore.getInstance("JKS"); + File file = new File("src/test/resources/keystore.jks"); + ks.load(new FileInputStream(file), "password".toCharArray()); + + KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); + kmf.init(ks, "password".toCharArray()); + + TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); + tmf.init(ks); + + SSLContext sslContext = SSLContext.getInstance("TLSv1"); + sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); + return sslContext; + } + + @After + public void tearDown() { + IO.setDefaultSSLContext(null); + IO.setDefaultHostnameVerifier(null); + } + + @Test(timeout = TIMEOUT) + public void connect() throws Exception { + final BlockingQueue values = new LinkedBlockingQueue(); + IO.Options opts = createOptions(); + opts.sslContext = createSSLContext(); + opts.hostnameVerifier = hostnameVerifier; + socket = client(opts); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.emit("echo"); + socket.on("echoBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer("done"); + } + }); + } + }); + socket.connect(); + values.take(); + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void defaultSSLContext() throws Exception { + final BlockingQueue values = new LinkedBlockingQueue(); + IO.setDefaultSSLContext(createSSLContext()); + IO.setDefaultHostnameVerifier(hostnameVerifier); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.emit("echo"); + socket.on("echoBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer("done"); + } + }); + } + }); + socket.connect(); + values.take(); + socket.close(); + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ServerConnectionNamespaceTest.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ServerConnectionNamespaceTest.java new file mode 100644 index 0000000..46974b0 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ServerConnectionNamespaceTest.java @@ -0,0 +1,12 @@ +package io.socket.client; + +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ServerConnectionNamespaceTest extends ServerConnectionTest { + + protected String nsp() { + return "/foo"; + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ServerConnectionTest.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ServerConnectionTest.java new file mode 100644 index 0000000..6c421a1 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/ServerConnectionTest.java @@ -0,0 +1,361 @@ +package io.socket.client; + +import io.socket.emitter.Emitter; +import io.socket.engineio.client.Transport; +import io.socket.engineio.client.transports.Polling; +import io.socket.engineio.client.transports.WebSocket; +import org.json.JSONObject; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.net.URISyntaxException; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; + +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.assertThat; + +@RunWith(JUnit4.class) +public class ServerConnectionTest extends Connection { + + private Socket socket; + private Socket socket2; + + @Test(timeout = TIMEOUT) + public void openAndClose() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args); + socket.disconnect(); + } + }).on(Socket.EVENT_DISCONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args); + } + }); + socket.connect(); + + assertThat(((Object[])values.take()).length, is(0)); + Object[] args = (Object[] )values.take(); + assertThat(args.length, is(1)); + assertThat(args[0], is(instanceOf(String.class))); + } + + @Test(timeout = TIMEOUT) + public void message() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.send("foo", "bar"); + } + }).on(Socket.EVENT_MESSAGE, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args); + } + }); + socket.connect(); + + assertThat((Object[])values.take(), is(new Object[] {"hello client"})); + assertThat((Object[])values.take(), is(new Object[] {"foo", "bar"})); + socket.disconnect(); + } + + @Test(timeout = TIMEOUT) + public void event() throws Exception { + final BlockingQueue values = new LinkedBlockingQueue(); + + final JSONObject obj = new JSONObject(); + obj.put("foo", 1); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.emit("echo", obj, null, "bar"); + } + }).on("echoBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args); + } + }); + socket.connect(); + + Object[] args = (Object[])values.take(); + assertThat(args.length, is(3)); + assertThat(args[0].toString(), is(obj.toString())); + assertThat(args[1], is(nullValue())); + assertThat((String)args[2], is("bar")); + socket.disconnect(); + } + + @Test(timeout = TIMEOUT) + public void ack() throws Exception { + final BlockingQueue values = new LinkedBlockingQueue(); + + final JSONObject obj = new JSONObject(); + obj.put("foo", 1); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.emit("ack", new Object[] {obj, "bar"}, new Ack() { + @Override + public void call(Object... args) { + values.offer(args); + } + }); + } + }); + socket.connect(); + + Object[] args = (Object[])values.take(); + assertThat(args.length, is(2)); + assertThat(args[0].toString(), is(obj.toString())); + assertThat((String)args[1], is("bar")); + socket.disconnect(); + } + + @Test(timeout = TIMEOUT) + public void ackWithoutArgs() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.emit("ack", null, new Ack() { + @Override + public void call(Object... args) { + values.offer(args.length); + } + }); + } + }); + socket.connect(); + + assertThat((Integer)values.take(), is(0)); + socket.disconnect(); + } + + @Test(timeout = TIMEOUT) + public void ackWithoutArgsFromClient() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.on("ack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args); + Ack ack = (Ack)args[0]; + ack.call(); + } + }).on("ackBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args); + socket.disconnect(); + } + }); + socket.emit("callAck"); + } + }); + socket.connect(); + + Object[] args = (Object[])values.take(); + assertThat(args.length, is(1)); + assertThat(args[0], is(instanceOf(Ack.class))); + args = (Object[])values.take(); + assertThat(args.length, is(0)); + socket.disconnect(); + } + + @Test(timeout = TIMEOUT) + public void closeEngineConnection() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.io().engine.on(io.socket.engineio.client.Socket.EVENT_CLOSE, new Emitter.Listener() { + @Override + public void call(Object... objects) { + values.offer("done"); + } + }); + socket.disconnect(); + } + }); + socket.connect(); + values.take(); + } + + @Test(timeout = TIMEOUT) + public void broadcast() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + try { + socket2 = client(); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + + socket2.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket2.emit("broadcast", "hi"); + } + }); + socket2.connect(); + } + }).on("broadcastBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args); + } + }); + socket.connect(); + + Object[] args = (Object[])values.take(); + assertThat(args.length, is(1)); + assertThat((String)args[0], is("hi")); + socket.disconnect(); + socket2.disconnect(); + } + + @Test(timeout = TIMEOUT) + public void room() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.emit("room", "hi"); + } + }).on("roomBack", new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(args); + } + }); + socket.connect(); + + Object[] args = (Object[])values.take(); + assertThat(args.length, is(1)); + assertThat((String)args[0], is("hi")); + socket.disconnect(); + } + + @Test(timeout = TIMEOUT) + public void pollingHeaders() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + IO.Options opts = createOptions(); + opts.transports = new String[] {Polling.NAME}; + socket = client(opts); + socket.io().on(Manager.EVENT_TRANSPORT, new Emitter.Listener() { + @Override + public void call(Object... args) { + Transport transport = (Transport)args[0]; + transport.on(Transport.EVENT_REQUEST_HEADERS, new Emitter.Listener() { + @Override + public void call(Object... args) { + @SuppressWarnings("unchecked") + Map> headers = (Map>)args[0]; + headers.put("X-SocketIO", Arrays.asList("hi")); + } + }).on(Transport.EVENT_RESPONSE_HEADERS, new Emitter.Listener() { + @Override + public void call(Object... args) { + @SuppressWarnings("unchecked") + Map> headers = (Map>)args[0]; + List value = headers.get("X-SocketIO"); + values.offer(value != null ? value.get(0) : ""); + } + }); + } + }); + socket.open(); + + assertThat((String)values.take(), is("hi")); + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void websocketHandshakeHeaders() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + IO.Options opts = createOptions(); + opts.transports = new String[] {WebSocket.NAME}; + socket = client(opts); + socket.io().on(Manager.EVENT_TRANSPORT, new Emitter.Listener() { + @Override + public void call(Object... args) { + Transport transport = (Transport)args[0]; + transport.on(Transport.EVENT_REQUEST_HEADERS, new Emitter.Listener() { + @Override + public void call(Object... args) { + @SuppressWarnings("unchecked") + Map> headers = (Map>)args[0]; + headers.put("X-SocketIO", Arrays.asList("hi")); + } + }).on(Transport.EVENT_RESPONSE_HEADERS, new Emitter.Listener() { + @Override + public void call(Object... args) { + @SuppressWarnings("unchecked") + Map> headers = (Map>)args[0]; + List value = headers.get("X-SocketIO"); + values.offer(value != null ? value.get(0) : ""); + } + }); + } + }); + socket.open(); + + assertThat((String)values.take(), is("hi")); + socket.close(); + } + + @Test(timeout = TIMEOUT) + public void disconnectFromServer() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + socket.emit("requestDisconnect"); + } + }).on(Socket.EVENT_DISCONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer("disconnected"); + } + }); + socket.connect(); + assertThat((String)values.take(), is("disconnected")); + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/SocketTest.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/SocketTest.java new file mode 100644 index 0000000..708e7cb --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/SocketTest.java @@ -0,0 +1,171 @@ +package io.socket.client; + +import io.socket.emitter.Emitter; +import io.socket.util.Optional; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.net.URISyntaxException; +import java.util.Timer; +import java.util.TimerTask; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.Matchers.greaterThan; +import static org.junit.Assert.assertThat; + +@RunWith(JUnit4.class) +public class SocketTest extends Connection { + + private Socket socket; + + @Test(timeout = TIMEOUT) + public void shouldHaveAnAccessibleSocketIdEqualToTheEngineIOSocketId() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + values.offer(Optional.ofNullable(socket.id())); + } + }); + socket.connect(); + + @SuppressWarnings("unchecked") + Optional id = values.take(); + assertThat(id.isPresent(), is(true)); + assertThat(id.get(), is(socket.io().engine.id())); + socket.disconnect(); + } + + @Test(timeout = TIMEOUT) + public void clearsSocketIdUponDisconnection() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + socket.on(Socket.EVENT_DISCONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(Optional.ofNullable(socket.id())); + } + }); + + socket.disconnect(); + } + }); + socket.connect(); + @SuppressWarnings("unchecked") + Optional id = values.take(); + assertThat(id.isPresent(), is(false)); + } + + @Test(timeout = TIMEOUT) + public void doesNotFireConnectErrorIfWeForceDisconnectInOpeningState() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + IO.Options opts = new IO.Options(); + opts.timeout = 100; + socket = client(opts); + socket.on(Socket.EVENT_CONNECT_ERROR, new Emitter.Listener() { + @Override + public void call(Object... args) { + values.offer(Optional.of(new Error("Unexpected"))); + } + }); + socket.connect(); + socket.disconnect(); + + new Timer().schedule(new TimerTask() { + @Override + public void run() { + values.offer(Optional.empty()); + } + }, 300); + + @SuppressWarnings("unchecked") + Optional err = values.take(); + if (err.isPresent()) throw err.get(); + } + + @Test(timeout = TIMEOUT) + public void pingAndPongWithLatency() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + final boolean[] pinged = new boolean[] { false }; + socket.once(Socket.EVENT_PING, new Emitter.Listener() { + @Override + public void call(Object... args) { + pinged[0] = true; + } + }); + socket.once(Socket.EVENT_PONG, new Emitter.Listener() { + @Override + public void call(Object... args) { + long ms = (long)args[0]; + values.offer(pinged[0]); + values.offer(ms); + } + }); + } + }); + socket.connect(); + + @SuppressWarnings("unchecked") + boolean pinged = (boolean)values.take(); + assertThat(pinged, is(true)); + + @SuppressWarnings("unchecked") + long ms = (long)values.take(); + assertThat(ms, greaterThan((long)0)); + + socket.disconnect(); + } + + @Test(timeout = TIMEOUT) + public void shouldChangeSocketIdUponReconnection() throws URISyntaxException, InterruptedException { + final BlockingQueue values = new LinkedBlockingQueue(); + socket = client(); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + values.offer(Optional.ofNullable(socket.id())); + + socket.on(Socket.EVENT_RECONNECT_ATTEMPT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + values.offer(Optional.ofNullable(socket.id())); + } + }); + + socket.on(Socket.EVENT_RECONNECT, new Emitter.Listener() { + @Override + public void call(Object... objects) { + values.offer(Optional.ofNullable(socket.id())); + } + }); + + socket.io().engine.close(); + } + }); + socket.connect(); + @SuppressWarnings("unchecked") + Optional id1 = values.take(); + + @SuppressWarnings("unchecked") + Optional id2 = values.take(); + assertThat(id2.isPresent(), is(false)); + + @SuppressWarnings("unchecked") + Optional id3 = values.take(); + assertThat(id3.get(), is(not(id1.get()))); + + socket.disconnect(); + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/UrlTest.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/UrlTest.java new file mode 100644 index 0000000..fbcf42d --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/UrlTest.java @@ -0,0 +1,72 @@ +package io.socket.client; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.net.MalformedURLException; +import java.net.URISyntaxException; +import java.net.URL; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.not; +import static org.junit.Assert.assertThat; + +@RunWith(JUnit4.class) +public class UrlTest { + + @Test + public void parse() throws URISyntaxException { + assertThat(Url.parse("http://username:password@host:8080/directory/file?query#ref").toString(), + is("http://username:password@host:8080/directory/file?query#ref")); + } + + @Test + public void parseRelativePath() throws URISyntaxException { + URL url = Url.parse("https://woot.com/test"); + assertThat(url.getProtocol(), is("https")); + assertThat(url.getHost(), is("woot.com")); + assertThat(url.getPath(), is("/test")); + } + + @Test + public void parseNoProtocol() throws URISyntaxException { + URL url = Url.parse("//localhost:3000"); + assertThat(url.getProtocol(), is("https")); + assertThat(url.getHost(), is("localhost")); + assertThat(url.getPort(), is(3000)); + } + + @Test + public void parseNamespace() throws URISyntaxException { + assertThat(Url.parse("http://woot.com/woot").getPath(), is("/woot")); + assertThat(Url.parse("http://google.com").getPath(), is("/")); + assertThat(Url.parse("http://google.com/").getPath(), is("/")); + } + + @Test + public void parseDefaultPort() throws URISyntaxException { + assertThat(Url.parse("http://google.com/").toString(), is("http://google.com:80/")); + assertThat(Url.parse("https://google.com/").toString(), is("https://google.com:443/")); + } + + @Test + public void extractId() throws MalformedURLException { + String id1 = Url.extractId("http://google.com:80/"); + String id2 = Url.extractId("http://google.com/"); + String id3 = Url.extractId("https://google.com/"); + assertThat(id1, is(id2)); + assertThat(id1, is(not(id3))); + assertThat(id2, is(not(id3))); + } + + @Test + public void ipv6() throws URISyntaxException, MalformedURLException { + String url = "http://[::1]"; + URL parsed = Url.parse(url); + assertThat(parsed.getProtocol(), is("http")); + assertThat(parsed.getHost(), is("[::1]")); + assertThat(parsed.getPort(), is(80)); + assertThat(Url.extractId(url), is("http://[::1]:80")); + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/executions/Connection.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/executions/Connection.java new file mode 100644 index 0000000..1d1a8c8 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/executions/Connection.java @@ -0,0 +1,24 @@ +package io.socket.client.executions; + +import io.socket.emitter.Emitter; +import io.socket.client.IO; +import io.socket.client.Socket; + +import java.net.URISyntaxException; + +public class Connection { + + public static void main(String[] args) throws URISyntaxException { + IO.Options options = new IO.Options(); + options.forceNew = true; + final Socket socket = IO.socket("http://localhost:" + System.getenv("PORT"), options); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + System.out.println("connect"); + socket.close(); + } + }); + socket.open(); + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/executions/ConnectionFailure.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/executions/ConnectionFailure.java new file mode 100644 index 0000000..92c9b3b --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/executions/ConnectionFailure.java @@ -0,0 +1,36 @@ +package io.socket.client.executions; + +import io.socket.emitter.Emitter; +import io.socket.client.IO; +import io.socket.client.Socket; + +import java.net.URISyntaxException; + +public class ConnectionFailure { + + public static void main(String[] args) throws URISyntaxException { + int port = Integer.parseInt(System.getenv("PORT")); + port++; + IO.Options options = new IO.Options(); + options.forceNew = true; + options.reconnection = false; + final Socket socket = IO.socket("http://localhost:" + port, options); + socket.on(Socket.EVENT_CONNECT_TIMEOUT, new Emitter.Listener() { + @Override + public void call(Object... args) { + System.out.println("connect timeout"); + } + }).on(Socket.EVENT_CONNECT_ERROR, new Emitter.Listener() { + @Override + public void call(Object... args) { + System.out.println("connect error"); + } + }).on(Socket.EVENT_DISCONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + System.out.println("disconnect"); + } + }); + socket.open(); + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/executions/ImmediateClose.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/executions/ImmediateClose.java new file mode 100644 index 0000000..1e889fd --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/client/executions/ImmediateClose.java @@ -0,0 +1,29 @@ +package io.socket.client.executions; + +import io.socket.emitter.Emitter; +import io.socket.client.IO; +import io.socket.client.Socket; + +import java.net.URISyntaxException; + +public class ImmediateClose { + + public static void main(String[] args) throws URISyntaxException { + IO.Options options = new IO.Options(); + options.forceNew = true; + final Socket socket = IO.socket("http://localhost:" + System.getenv("PORT"), options); + socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + System.out.println("connect"); + } + }).on(Socket.EVENT_DISCONNECT, new Emitter.Listener() { + @Override + public void call(Object... args) { + System.out.println("disconnect"); + } + }); + socket.connect(); + socket.disconnect(); + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/hasbinary/HasBinaryTest.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/hasbinary/HasBinaryTest.java new file mode 100644 index 0000000..c83fca6 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/hasbinary/HasBinaryTest.java @@ -0,0 +1,73 @@ +package io.socket.hasbinary; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.nio.charset.Charset; + +import static org.junit.Assert.assertTrue; + +@RunWith(JUnit4.class) +public class HasBinaryTest { + + @Test + public void byteArray() { + assertTrue(HasBinary.hasBinary(new byte[0])); + } + + @Test + public void anArrayThatDoesNotContainByteArray() throws JSONException { + JSONArray arr = new JSONArray("[1, \"cool\", 2]"); + assertTrue(!HasBinary.hasBinary(arr)); + } + + @Test + public void anArrayContainsByteArray() throws JSONException { + JSONArray arr = new JSONArray("[1, null, 2]"); + arr.put(1, "asdfasdf".getBytes(Charset.forName("UTF-8"))); + assertTrue(HasBinary.hasBinary(arr)); + } + + @Test + public void anObjectThatDoesNotContainByteArray() throws JSONException { + JSONObject ob = new JSONObject("{\"a\": \"a\", \"b\": [], \"c\": 1234}"); + assertTrue(!HasBinary.hasBinary(ob)); + } + + @Test + public void anObjectThatContainsByteArray() throws JSONException { + JSONObject ob = new JSONObject("{\"a\": \"a\", \"b\": null, \"c\": 1234}"); + ob.put("b", "abc".getBytes(Charset.forName("UTF-8"))); + assertTrue(HasBinary.hasBinary(ob)); + } + + @Test + public void testNull() { + assertTrue(!HasBinary.hasBinary(null)); + } + + @Test + public void aComplexObjectThatContainsNoBinary() throws JSONException { + JSONObject ob = new JSONObject(); + ob.put("x", new JSONArray("[\"a\", \"b\", 123]")); + ob.put("y", JSONObject.NULL); + ob.put("z", new JSONObject("{\"a\": \"x\", \"b\": \"y\", \"c\": 3, \"d\": null}")); + ob.put("w", new JSONArray()); + assertTrue(!HasBinary.hasBinary(ob)); + } + + @Test + public void aComplexObjectThatContainsBinary() throws JSONException { + JSONObject ob = new JSONObject(); + ob.put("x", new JSONArray("[\"a\", \"b\", 123]")); + ob.put("y", JSONObject.NULL); + ob.put("z", new JSONObject("{\"a\": \"x\", \"b\": \"y\", \"c\": 3, \"d\": null}")); + ob.put("w", new JSONArray()); + ob.put("bin", "xxx".getBytes(Charset.forName("UTF-8"))); + assertTrue(HasBinary.hasBinary(ob)); + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/parser/ByteArrayTest.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/parser/ByteArrayTest.java new file mode 100644 index 0000000..5154cec --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/parser/ByteArrayTest.java @@ -0,0 +1,105 @@ +package io.socket.parser; + +import io.socket.emitter.Emitter; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.nio.charset.Charset; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +@RunWith(JUnit4.class) +public class ByteArrayTest { + + private static Parser.Encoder encoder = new Parser.Encoder(); + + @Test + public void encodeByteArray() { + Packet packet = new Packet(Parser.BINARY_EVENT); + packet.data = "abc".getBytes(Charset.forName("UTF-8")); + packet.id = 23; + packet.nsp = "/cool"; + Helpers.testBin(packet); + } + + @Test + public void encodeByteArray2() { + Packet packet = new Packet(Parser.BINARY_EVENT); + packet.data = new byte[2]; + packet.id = 0; + packet.nsp = "/"; + Helpers.testBin(packet); + } + + @Test + public void encodeByteArrayDeepInJson() throws JSONException { + JSONObject data = new JSONObject("{a: \"hi\", b: {}, c: {a: \"bye\", b: {}}}"); + data.getJSONObject("b").put("why", new byte[3]); + data.getJSONObject("c").getJSONObject("b").put("a", new byte[6]); + + Packet packet = new Packet(Parser.BINARY_EVENT); + packet.data = data; + packet.id = 999; + packet.nsp = "/deep"; + Helpers.testBin(packet); + } + + @Test + public void encodeDeepBinaryJSONWithNullValue() throws JSONException { + JSONObject data = new JSONObject("{a: \"b\", c: 4, e: {g: null}, h: null}"); + data.put("h", new byte[9]); + + Packet packet = new Packet(Parser.BINARY_EVENT); + packet.data = data; + packet.nsp = "/"; + packet.id = 600; + Helpers.testBin(packet); + } + + @Test + public void encodeBinaryAckWithByteArray() throws JSONException { + JSONArray data = new JSONArray("[a, null, {}]"); + data.put(1, "xxx".getBytes(Charset.forName("UTF-8"))); + + Packet packet = new Packet(Parser.BINARY_ACK); + packet.data = data; + packet.id = 127; + packet.nsp = "/back"; + Helpers.testBin(packet); + } + + @Test + public void cleanItselfUpOnClose() { + JSONArray data = new JSONArray(); + data.put(new byte[2]); + data.put(new byte[3]); + + Packet packet = new Packet(Parser.BINARY_EVENT); + packet.data = data; + packet.id = 0; + packet.nsp = "/"; + + encoder.encode(packet, new Parser.Encoder.Callback() { + @Override + public void call(final Object[] encodedPackets) { + final Parser.Decoder decoder = new Parser.Decoder(); + decoder.on(Parser.Decoder.EVENT_DECODED, new Emitter.Listener() { + @Override + public void call(Object... args) { + throw new RuntimeException("received a packet when not all binary data was sent."); + } + }); + + decoder.add((String)encodedPackets[0]); + decoder.add((byte[]) encodedPackets[1]); + decoder.destroy(); + assertThat(decoder.reconstructor.buffers.size(), is(0)); + } + }); + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/parser/Helpers.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/parser/Helpers.java new file mode 100644 index 0000000..d56188b --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/parser/Helpers.java @@ -0,0 +1,99 @@ +package io.socket.parser; + +import io.socket.emitter.Emitter; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.skyscreamer.jsonassert.JSONAssert; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +@RunWith(JUnit4.class) +public class Helpers { + + private static Parser.Encoder encoder = new Parser.Encoder(); + private static Packet errorPacket = new Packet(Parser.ERROR, "parser error"); + + public static void test(final Packet obj) { + encoder.encode(obj, new Parser.Encoder.Callback() { + @Override + public void call(Object[] encodedPackets) { + Parser.Decoder decoder = new Parser.Decoder(); + decoder.on(Parser.Decoder.EVENT_DECODED, new Emitter.Listener() { + @Override + public void call(Object... args) { + Packet packet = (Packet)args[0]; + assertPacket(packet, obj); + } + }); + decoder.add((String)encodedPackets[0]); + } + }); + } + + public static void testDecodeError(final String errorMessage) { + Parser.Decoder decoder = new Parser.Decoder(); + decoder.on(Parser.Decoder.EVENT_DECODED, new Emitter.Listener() { + @Override + public void call(Object... args) { + Packet packet = (Packet)args[0]; + assertPacket(errorPacket, packet); + } + }); + decoder.add(errorMessage); + } + + @SuppressWarnings("unchecked") + public static void testBin(final Packet obj) { + final Object originalData = obj.data; + encoder.encode(obj, new Parser.Encoder.Callback() { + @Override + public void call(Object[] encodedPackets) { + Parser.Decoder decoder = new Parser.Decoder(); + decoder.on(Parser.Decoder.EVENT_DECODED, new Emitter.Listener() { + @Override + public void call(Object... args) { + Packet packet = (Packet)args[0]; + obj.data = originalData; + obj.attachments = -1; + assertPacket(packet, obj); + } + }); + + for (Object packet : encodedPackets) { + if (packet instanceof String) { + decoder.add((String)packet); + } else if (packet instanceof byte[]) { + decoder.add((byte[])packet); + } + } + } + }); + } + + public static void assertPacket(Packet expected, Packet actual) { + assertThat(actual.type, is(expected.type)); + assertThat(actual.id, is(expected.id)); + assertThat(actual.nsp, is(expected.nsp)); + assertThat(actual.attachments, is(expected.attachments)); + + if (expected.data instanceof JSONArray) { + try { + JSONAssert.assertEquals((JSONArray)expected.data, (JSONArray)actual.data, true); + } catch (JSONException e) { + throw new AssertionError(e); + } + } else if (expected.data instanceof JSONObject) { + try { + JSONAssert.assertEquals((JSONObject)expected.data, (JSONObject)actual.data, true); + } catch (JSONException e) { + throw new AssertionError(e); + } + } else { + assertThat(actual.data, is(expected.data)); + } + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/parser/ParserTest.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/parser/ParserTest.java new file mode 100644 index 0000000..d7ff220 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/parser/ParserTest.java @@ -0,0 +1,67 @@ +package io.socket.parser; + +import org.json.JSONArray; +import org.json.JSONException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ParserTest { + + private static Parser.Encoder encoder = new Parser.Encoder(); + + @Test + public void encodeConnection() { + Packet packet = new Packet(Parser.CONNECT); + packet.nsp = "/woot"; + Helpers.test(packet); + } + + @Test + public void encodeDisconnection() { + Packet packet = new Packet(Parser.DISCONNECT); + packet.nsp = "/woot"; + Helpers.test(packet); + } + + @Test + public void encodeEvent() throws JSONException { + Packet packet1 = new Packet(Parser.EVENT); + packet1.data = new JSONArray("[\"a\", 1, {}]"); + packet1.nsp = "/"; + Helpers.test(packet1); + + Packet packet2 = new Packet(Parser.EVENT); + packet2.data = new JSONArray("[\"a\", 1, {}]"); + packet2.nsp = "/test"; + Helpers.test(packet2); + } + + @Test + public void encodeAck() throws JSONException { + Packet packet = new Packet(Parser.ACK); + packet.data = new JSONArray("[\"a\", 1, {}]"); + packet.id = 123; + packet.nsp = "/"; + Helpers.test(packet); + } + + @Test + public void decodeInError() throws JSONException { + // Random string + Helpers.testDecodeError("asdf"); + // Unknown type + Helpers.testDecodeError(Parser.types.length + "asdf"); + // Binary event with no `-` + Helpers.testDecodeError(Parser.BINARY_EVENT + "asdf"); + // Binary ack with no `-` + Helpers.testDecodeError(Parser.BINARY_ACK + "asdf"); + // Binary event with no attachment + Helpers.testDecodeError(String.valueOf(Parser.BINARY_EVENT)); + // event non numeric id + Helpers.testDecodeError(Parser.EVENT + "2sd"); + // event with invalid json data + Helpers.testDecodeError(Parser.EVENT + "2[\"a\",1,{asdf}]"); + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/java/io/socket/util/Optional.java b/JUNK/socket.io-client-java-master/src/test/java/io/socket/util/Optional.java new file mode 100644 index 0000000..aadc603 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/java/io/socket/util/Optional.java @@ -0,0 +1,44 @@ +package io.socket.util; + +import java.util.NoSuchElementException; + +public class Optional { + + static final Optional EMPTY = Optional.ofNullable(null); + + private T value; + + public static Optional of(T value) { + if (value == null) { + throw new NullPointerException(); + } + return new Optional(value); + } + + public static Optional ofNullable(T value) { + return new Optional(value); + } + + public static Optional empty() { + return EMPTY; + } + + private Optional(T value) { + this.value = value; + } + + public boolean isPresent() { + return this.value != null; + } + + public T get() { + if (this.value == null) { + throw new NoSuchElementException(); + } + return this.value; + } + + public T orElse(T other) { + return this.value != null ? this.value : other; + } +} diff --git a/JUNK/socket.io-client-java-master/src/test/resources/cert.pem b/JUNK/socket.io-client-java-master/src/test/resources/cert.pem new file mode 100644 index 0000000..bea755c --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/resources/cert.pem @@ -0,0 +1,10 @@ +-----BEGIN CERTIFICATE----- +MIIBfDCCASYCCQDTnGd/oOyF1DANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJB +VTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0 +cyBQdHkgTHRkMB4XDTE0MDcwNzEzMTUzN1oXDTQxMTEyMTEzMTUzN1owRTELMAkG +A1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0 +IFdpZGdpdHMgUHR5IEx0ZDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQC6sdeFPlqk +5Pap9woFx1RO05gLidw4MNcL+ZRSxy/sNeE4PhT/RLFcEvnXiHc92wT8YB5Z+WCM +k/jRQ0q19PNPAgMBAAEwDQYJKoZIhvcNAQEFBQADQQCnmm1N/yZiMBZw2JDfbsx3 +ecc0BGQ2BwWQuGHzP07TMi1AuOyNZSczl907OphYb9iRC8shZ4O+oXjQAuGTQ1Hp +-----END CERTIFICATE----- diff --git a/JUNK/socket.io-client-java-master/src/test/resources/key.pem b/JUNK/socket.io-client-java-master/src/test/resources/key.pem new file mode 100644 index 0000000..4a78a22 --- /dev/null +++ b/JUNK/socket.io-client-java-master/src/test/resources/key.pem @@ -0,0 +1,9 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIBOwIBAAJBALqx14U+WqTk9qn3CgXHVE7TmAuJ3Dgw1wv5lFLHL+w14Tg+FP9E +sVwS+deIdz3bBPxgHln5YIyT+NFDSrX0808CAwEAAQJAIdwLSIEsk2drTRwe1zl1 +ku5RTxZruE0zU1qqifDSQjab1StAK1tapxBVRlRlyLCfD704UClsU8sjGtq0Nh6n +kQIhAO2YJM1g0w9bWYet3zC2UdEASPzaQ7llpZmc51NRBx2NAiEAyShICAaclEuy +wwuD4hibV+b6I8CLYoyPBo32EaceN0sCIQCUed6NxfM/houlgV+Xtmfcnzv9X3yx +EDdzjpz08Q7sRQIgZFv1fBOYYSBXQppnJRFzx2pUmCvDHtrTrMh84RfIqnsCIQCf +JjNXXxOaHn1PNZpi6EHReiFQmy1Swt+AxpTsKixsfA== +-----END RSA PRIVATE KEY----- diff --git a/JUNK/socket.io-client-java-master/src/test/resources/keystore.jks b/JUNK/socket.io-client-java-master/src/test/resources/keystore.jks new file mode 100644 index 0000000000000000000000000000000000000000..24c507bacc738aa6c51ef2948f26ec1d8d8fe416 GIT binary patch literal 859 zcmezO_TO6u1_mY|W&~qKLmm2`#U#kc$jZRd#MsER zPD-`O=1F|QBTwE*IeWyGDm-B0JohKljs5zEP30#xyfir2@#5EIe)cNQDo54_4vmk} zGM6oKP*EcK!UrX3z9@ zZ>t}PU7YsyoU)c;eaF><#m?V$1^BKq{g{_iccLjdP!zUQserSMz@P_Qzsu zu^r~!te^XTg#7Yd^kD%j=Vnf8rM{XA%sW|sM!2i3b#4$AWxZ8>>eju(^Iy4cIDMYC zeZlfc>*kdC3oZVbYO8ghbzNq|)|2!9Ee~0^t^IqNO{IpG;7YM=JI}1UR6Zm9jF{R) z!|(s<*slNS{lDK;c1?oX&GXk?{%!D{-MCIU<@e#;eOCj&pO##1297J%2t88+OJF=T z0OP3!h}D=l87|LBuV3({^@;&68>d#AN85K^V5G4!7`Pg88*s8QhqABsr2J#?5E@27Jypq(Sywnnf@XVC-%#vb-fRaiDpOO> + + IO Connect + + + + + + + + \ No newline at end of file diff --git a/Server File/node_modules/.bin/mime b/Server File/node_modules/.bin/mime new file mode 100644 index 0000000..0dbddf0 --- /dev/null +++ b/Server File/node_modules/.bin/mime @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../mime/cli.js" "$@" + ret=$? +else + node "$basedir/../mime/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/Server File/node_modules/.bin/mime.cmd b/Server File/node_modules/.bin/mime.cmd new file mode 100644 index 0000000..8169562 --- /dev/null +++ b/Server File/node_modules/.bin/mime.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\mime\cli.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\mime\cli.js" %* +) \ No newline at end of file diff --git a/Server File/node_modules/accepts/HISTORY.md b/Server File/node_modules/accepts/HISTORY.md new file mode 100644 index 0000000..0477ed7 --- /dev/null +++ b/Server File/node_modules/accepts/HISTORY.md @@ -0,0 +1,212 @@ +1.3.3 / 2016-05-02 +================== + + * deps: mime-types@~2.1.11 + - deps: mime-db@~1.23.0 + * deps: negotiator@0.6.1 + - perf: improve `Accept` parsing speed + - perf: improve `Accept-Charset` parsing speed + - perf: improve `Accept-Encoding` parsing speed + - perf: improve `Accept-Language` parsing speed + +1.3.2 / 2016-03-08 +================== + + * deps: mime-types@~2.1.10 + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + - deps: mime-db@~1.22.0 + +1.3.1 / 2016-01-19 +================== + + * deps: mime-types@~2.1.9 + - deps: mime-db@~1.21.0 + +1.3.0 / 2015-09-29 +================== + + * deps: mime-types@~2.1.7 + - deps: mime-db@~1.19.0 + * deps: negotiator@0.6.0 + - Fix including type extensions in parameters in `Accept` parsing + - Fix parsing `Accept` parameters with quoted equals + - Fix parsing `Accept` parameters with quoted semicolons + - Lazy-load modules from main entry point + - perf: delay type concatenation until needed + - perf: enable strict mode + - perf: hoist regular expressions + - perf: remove closures getting spec properties + - perf: remove a closure from media type parsing + - perf: remove property delete from media type parsing + +1.2.13 / 2015-09-06 +=================== + + * deps: mime-types@~2.1.6 + - deps: mime-db@~1.18.0 + +1.2.12 / 2015-07-30 +=================== + + * deps: mime-types@~2.1.4 + - deps: mime-db@~1.16.0 + +1.2.11 / 2015-07-16 +=================== + + * deps: mime-types@~2.1.3 + - deps: mime-db@~1.15.0 + +1.2.10 / 2015-07-01 +=================== + + * deps: mime-types@~2.1.2 + - deps: mime-db@~1.14.0 + +1.2.9 / 2015-06-08 +================== + + * deps: mime-types@~2.1.1 + - perf: fix deopt during mapping + +1.2.8 / 2015-06-07 +================== + + * deps: mime-types@~2.1.0 + - deps: mime-db@~1.13.0 + * perf: avoid argument reassignment & argument slice + * perf: avoid negotiator recursive construction + * perf: enable strict mode + * perf: remove unnecessary bitwise operator + +1.2.7 / 2015-05-10 +================== + + * deps: negotiator@0.5.3 + - Fix media type parameter matching to be case-insensitive + +1.2.6 / 2015-05-07 +================== + + * deps: mime-types@~2.0.11 + - deps: mime-db@~1.9.1 + * deps: negotiator@0.5.2 + - Fix comparing media types with quoted values + - Fix splitting media types with quoted commas + +1.2.5 / 2015-03-13 +================== + + * deps: mime-types@~2.0.10 + - deps: mime-db@~1.8.0 + +1.2.4 / 2015-02-14 +================== + + * Support Node.js 0.6 + * deps: mime-types@~2.0.9 + - deps: mime-db@~1.7.0 + * deps: negotiator@0.5.1 + - Fix preference sorting to be stable for long acceptable lists + +1.2.3 / 2015-01-31 +================== + + * deps: mime-types@~2.0.8 + - deps: mime-db@~1.6.0 + +1.2.2 / 2014-12-30 +================== + + * deps: mime-types@~2.0.7 + - deps: mime-db@~1.5.0 + +1.2.1 / 2014-12-30 +================== + + * deps: mime-types@~2.0.5 + - deps: mime-db@~1.3.1 + +1.2.0 / 2014-12-19 +================== + + * deps: negotiator@0.5.0 + - Fix list return order when large accepted list + - Fix missing identity encoding when q=0 exists + - Remove dynamic building of Negotiator class + +1.1.4 / 2014-12-10 +================== + + * deps: mime-types@~2.0.4 + - deps: mime-db@~1.3.0 + +1.1.3 / 2014-11-09 +================== + + * deps: mime-types@~2.0.3 + - deps: mime-db@~1.2.0 + +1.1.2 / 2014-10-14 +================== + + * deps: negotiator@0.4.9 + - Fix error when media type has invalid parameter + +1.1.1 / 2014-09-28 +================== + + * deps: mime-types@~2.0.2 + - deps: mime-db@~1.1.0 + * deps: negotiator@0.4.8 + - Fix all negotiations to be case-insensitive + - Stable sort preferences of same quality according to client order + +1.1.0 / 2014-09-02 +================== + + * update `mime-types` + +1.0.7 / 2014-07-04 +================== + + * Fix wrong type returned from `type` when match after unknown extension + +1.0.6 / 2014-06-24 +================== + + * deps: negotiator@0.4.7 + +1.0.5 / 2014-06-20 +================== + + * fix crash when unknown extension given + +1.0.4 / 2014-06-19 +================== + + * use `mime-types` + +1.0.3 / 2014-06-11 +================== + + * deps: negotiator@0.4.6 + - Order by specificity when quality is the same + +1.0.2 / 2014-05-29 +================== + + * Fix interpretation when header not in request + * deps: pin negotiator@0.4.5 + +1.0.1 / 2014-01-18 +================== + + * Identity encoding isn't always acceptable + * deps: negotiator@~0.4.0 + +1.0.0 / 2013-12-27 +================== + + * Genesis diff --git a/Server File/node_modules/accepts/LICENSE b/Server File/node_modules/accepts/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/Server File/node_modules/accepts/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Server File/node_modules/accepts/README.md b/Server File/node_modules/accepts/README.md new file mode 100644 index 0000000..ae36676 --- /dev/null +++ b/Server File/node_modules/accepts/README.md @@ -0,0 +1,135 @@ +# accepts + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). Extracted from [koa](https://www.npmjs.com/package/koa) for general use. + +In addition to negotiator, it allows: + +- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` as well as `('text/html', 'application/json')`. +- Allows type shorthands such as `json`. +- Returns `false` when no types match +- Treats non-existent headers as `*` + +## Installation + +```sh +npm install accepts +``` + +## API + +```js +var accepts = require('accepts') +``` + +### accepts(req) + +Create a new `Accepts` object for the given `req`. + +#### .charset(charsets) + +Return the first accepted charset. If nothing in `charsets` is accepted, +then `false` is returned. + +#### .charsets() + +Return the charsets that the request accepts, in the order of the client's +preference (most preferred first). + +#### .encoding(encodings) + +Return the first accepted encoding. If nothing in `encodings` is accepted, +then `false` is returned. + +#### .encodings() + +Return the encodings that the request accepts, in the order of the client's +preference (most preferred first). + +#### .language(languages) + +Return the first accepted language. If nothing in `languages` is accepted, +then `false` is returned. + +#### .languages() + +Return the languages that the request accepts, in the order of the client's +preference (most preferred first). + +#### .type(types) + +Return the first accepted type (and it is returned as the same text as what +appears in the `types` array). If nothing in `types` is accepted, then `false` +is returned. + +The `types` array can contain full MIME types or file extensions. Any value +that is not a full MIME types is passed to `require('mime-types').lookup`. + +#### .types() + +Return the types that the request accepts, in the order of the client's +preference (most preferred first). + +## Examples + +### Simple type negotiation + +This simple example shows how to use `accepts` to return a different typed +respond body based on what the client wants to accept. The server lists it's +preferences in order and will get back the best match between the client and +server. + +```js +var accepts = require('accepts') +var http = require('http') + +function app(req, res) { + var accept = accepts(req) + + // the order of this list is significant; should be server preferred order + switch(accept.type(['json', 'html'])) { + case 'json': + res.setHeader('Content-Type', 'application/json') + res.write('{"hello":"world!"}') + break + case 'html': + res.setHeader('Content-Type', 'text/html') + res.write('hello, world!') + break + default: + // the fallback is text/plain, so no need to specify it above + res.setHeader('Content-Type', 'text/plain') + res.write('hello, world!') + break + } + + res.end() +} + +http.createServer(app).listen(3000) +``` + +You can test this out with the cURL program: +```sh +curl -I -H'Accept: text/html' http://localhost:3000/ +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/accepts.svg +[npm-url]: https://npmjs.org/package/accepts +[node-version-image]: https://img.shields.io/node/v/accepts.svg +[node-version-url]: http://nodejs.org/download/ +[travis-image]: https://img.shields.io/travis/jshttp/accepts/master.svg +[travis-url]: https://travis-ci.org/jshttp/accepts +[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/accepts +[downloads-image]: https://img.shields.io/npm/dm/accepts.svg +[downloads-url]: https://npmjs.org/package/accepts diff --git a/Server File/node_modules/accepts/index.js b/Server File/node_modules/accepts/index.js new file mode 100644 index 0000000..e80192a --- /dev/null +++ b/Server File/node_modules/accepts/index.js @@ -0,0 +1,231 @@ +/*! + * accepts + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var Negotiator = require('negotiator') +var mime = require('mime-types') + +/** + * Module exports. + * @public + */ + +module.exports = Accepts + +/** + * Create a new Accepts object for the given req. + * + * @param {object} req + * @public + */ + +function Accepts(req) { + if (!(this instanceof Accepts)) + return new Accepts(req) + + this.headers = req.headers + this.negotiator = new Negotiator(req) +} + +/** + * Check if the given `type(s)` is acceptable, returning + * the best match when true, otherwise `undefined`, in which + * case you should respond with 406 "Not Acceptable". + * + * The `type` value may be a single mime type string + * such as "application/json", the extension name + * such as "json" or an array `["json", "html", "text/plain"]`. When a list + * or array is given the _best_ match, if any is returned. + * + * Examples: + * + * // Accept: text/html + * this.types('html'); + * // => "html" + * + * // Accept: text/*, application/json + * this.types('html'); + * // => "html" + * this.types('text/html'); + * // => "text/html" + * this.types('json', 'text'); + * // => "json" + * this.types('application/json'); + * // => "application/json" + * + * // Accept: text/*, application/json + * this.types('image/png'); + * this.types('png'); + * // => undefined + * + * // Accept: text/*;q=.5, application/json + * this.types(['html', 'json']); + * this.types('html', 'json'); + * // => "json" + * + * @param {String|Array} types... + * @return {String|Array|Boolean} + * @public + */ + +Accepts.prototype.type = +Accepts.prototype.types = function (types_) { + var types = types_ + + // support flattened arguments + if (types && !Array.isArray(types)) { + types = new Array(arguments.length) + for (var i = 0; i < types.length; i++) { + types[i] = arguments[i] + } + } + + // no types, return all requested types + if (!types || types.length === 0) { + return this.negotiator.mediaTypes() + } + + if (!this.headers.accept) return types[0]; + var mimes = types.map(extToMime); + var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)); + var first = accepts[0]; + if (!first) return false; + return types[mimes.indexOf(first)]; +} + +/** + * Return accepted encodings or best fit based on `encodings`. + * + * Given `Accept-Encoding: gzip, deflate` + * an array sorted by quality is returned: + * + * ['gzip', 'deflate'] + * + * @param {String|Array} encodings... + * @return {String|Array} + * @public + */ + +Accepts.prototype.encoding = +Accepts.prototype.encodings = function (encodings_) { + var encodings = encodings_ + + // support flattened arguments + if (encodings && !Array.isArray(encodings)) { + encodings = new Array(arguments.length) + for (var i = 0; i < encodings.length; i++) { + encodings[i] = arguments[i] + } + } + + // no encodings, return all requested encodings + if (!encodings || encodings.length === 0) { + return this.negotiator.encodings() + } + + return this.negotiator.encodings(encodings)[0] || false +} + +/** + * Return accepted charsets or best fit based on `charsets`. + * + * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5` + * an array sorted by quality is returned: + * + * ['utf-8', 'utf-7', 'iso-8859-1'] + * + * @param {String|Array} charsets... + * @return {String|Array} + * @public + */ + +Accepts.prototype.charset = +Accepts.prototype.charsets = function (charsets_) { + var charsets = charsets_ + + // support flattened arguments + if (charsets && !Array.isArray(charsets)) { + charsets = new Array(arguments.length) + for (var i = 0; i < charsets.length; i++) { + charsets[i] = arguments[i] + } + } + + // no charsets, return all requested charsets + if (!charsets || charsets.length === 0) { + return this.negotiator.charsets() + } + + return this.negotiator.charsets(charsets)[0] || false +} + +/** + * Return accepted languages or best fit based on `langs`. + * + * Given `Accept-Language: en;q=0.8, es, pt` + * an array sorted by quality is returned: + * + * ['es', 'pt', 'en'] + * + * @param {String|Array} langs... + * @return {Array|String} + * @public + */ + +Accepts.prototype.lang = +Accepts.prototype.langs = +Accepts.prototype.language = +Accepts.prototype.languages = function (languages_) { + var languages = languages_ + + // support flattened arguments + if (languages && !Array.isArray(languages)) { + languages = new Array(arguments.length) + for (var i = 0; i < languages.length; i++) { + languages[i] = arguments[i] + } + } + + // no languages, return all requested languages + if (!languages || languages.length === 0) { + return this.negotiator.languages() + } + + return this.negotiator.languages(languages)[0] || false +} + +/** + * Convert extnames to mime. + * + * @param {String} type + * @return {String} + * @private + */ + +function extToMime(type) { + return type.indexOf('/') === -1 + ? mime.lookup(type) + : type +} + +/** + * Check if mime is valid. + * + * @param {String} type + * @return {String} + * @private + */ + +function validMime(type) { + return typeof type === 'string'; +} diff --git a/Server File/node_modules/accepts/package.json b/Server File/node_modules/accepts/package.json new file mode 100644 index 0000000..65a3bbf --- /dev/null +++ b/Server File/node_modules/accepts/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + { + "raw": "accepts@~1.3.3", + "scope": null, + "escapedName": "accepts", + "name": "accepts", + "rawSpec": "~1.3.3", + "spec": ">=1.3.3 <1.4.0", + "type": "range" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express" + ] + ], + "_from": "accepts@>=1.3.3 <1.4.0", + "_id": "accepts@1.3.3", + "_inCache": true, + "_location": "/accepts", + "_nodeVersion": "4.4.3", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/accepts-1.3.3.tgz_1462251932032_0.7092335098423064" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "raw": "accepts@~1.3.3", + "scope": null, + "escapedName": "accepts", + "name": "accepts", + "rawSpec": "~1.3.3", + "spec": ">=1.3.3 <1.4.0", + "type": "range" + }, + "_requiredBy": [ + "/engine.io", + "/express" + ], + "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", + "_shasum": "c3ca7434938648c3e0d9c1e328dd68b622c284ca", + "_shrinkwrap": null, + "_spec": "accepts@~1.3.3", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express", + "bugs": { + "url": "https://github.com/jshttp/accepts/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "dependencies": { + "mime-types": "~2.1.11", + "negotiator": "0.6.1" + }, + "description": "Higher-level content negotiation", + "devDependencies": { + "istanbul": "0.4.3", + "mocha": "~1.21.5" + }, + "directories": {}, + "dist": { + "shasum": "c3ca7434938648c3e0d9c1e328dd68b622c284ca", + "tarball": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "gitHead": "3e925b1e65ed7da2798849683d49814680dfa426", + "homepage": "https://github.com/jshttp/accepts#readme", + "keywords": [ + "content", + "negotiation", + "accept", + "accepts" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "accepts", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/accepts.git" + }, + "scripts": { + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "1.3.3" +} diff --git a/Server File/node_modules/after/.npmignore b/Server File/node_modules/after/.npmignore new file mode 100644 index 0000000..6c78602 --- /dev/null +++ b/Server File/node_modules/after/.npmignore @@ -0,0 +1,2 @@ +node_modules +.monitor diff --git a/Server File/node_modules/after/.travis.yml b/Server File/node_modules/after/.travis.yml new file mode 100644 index 0000000..afd72d0 --- /dev/null +++ b/Server File/node_modules/after/.travis.yml @@ -0,0 +1,12 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - 0.9 + - 0.10 + - 0.12 + - 4.2.4 + - 5.4.1 + - iojs-1 + - iojs-2 + - iojs-3 diff --git a/Server File/node_modules/after/LICENCE b/Server File/node_modules/after/LICENCE new file mode 100644 index 0000000..7c35130 --- /dev/null +++ b/Server File/node_modules/after/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2011 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/Server File/node_modules/after/README.md b/Server File/node_modules/after/README.md new file mode 100644 index 0000000..fc69096 --- /dev/null +++ b/Server File/node_modules/after/README.md @@ -0,0 +1,115 @@ +# After [![Build Status][1]][2] + +Invoke callback after n calls + +## Status: production ready + +## Example + +```js +var after = require("after") +var db = require("./db") // some db. + +var updateUser = function (req, res) { + // use after to run two tasks in parallel, + // namely get request body and get session + // then run updateUser with the results + var next = after(2, updateUser) + var results = {} + + getJSONBody(req, res, function (err, body) { + if (err) return next(err) + + results.body = body + next(null, results) + }) + + getSessionUser(req, res, function (err, user) { + if (err) return next(err) + + results.user = user + next(null, results) + }) + + // now do the thing! + function updateUser(err, result) { + if (err) { + res.statusCode = 500 + return res.end("Unexpected Error") + } + + if (!result.user || result.user.role !== "admin") { + res.statusCode = 403 + return res.end("Permission Denied") + } + + db.put("users:" + req.params.userId, result.body, function (err) { + if (err) { + res.statusCode = 500 + return res.end("Unexpected Error") + } + + res.statusCode = 200 + res.end("Ok") + }) + } +} +``` + +## Naive Example + +```js +var after = require("after") + , next = after(3, logItWorks) + +next() +next() +next() // it works + +function logItWorks() { + console.log("it works!") +} +``` + +## Example with error handling + +```js +var after = require("after") + , next = after(3, logError) + +next() +next(new Error("oops")) // logs oops +next() // does nothing + +// This callback is only called once. +// If there is an error the callback gets called immediately +// this avoids the situation where errors get lost. +function logError(err) { + console.log(err) +} +``` + +## Installation + +`npm install after` + +## Tests + +`npm test` + +## Contributors + + - Raynos + - defunctzombie + +## MIT Licenced + + [1]: https://secure.travis-ci.org/Raynos/after.png + [2]: http://travis-ci.org/Raynos/after + [3]: http://raynos.org/blog/2/Flow-control-in-node.js + [4]: http://stackoverflow.com/questions/6852059/determining-the-end-of-asynchronous-operations-javascript/6852307#6852307 + [5]: http://stackoverflow.com/questions/6869872/in-javascript-what-are-best-practices-for-executing-multiple-asynchronous-functi/6870031#6870031 + [6]: http://stackoverflow.com/questions/6864397/javascript-performance-long-running-tasks/6889419#6889419 + [7]: http://stackoverflow.com/questions/6597493/synchronous-database-queries-with-node-js/6620091#6620091 + [8]: http://github.com/Raynos/iterators + [9]: http://github.com/Raynos/composite diff --git a/Server File/node_modules/after/index.js b/Server File/node_modules/after/index.js new file mode 100644 index 0000000..ec24879 --- /dev/null +++ b/Server File/node_modules/after/index.js @@ -0,0 +1,28 @@ +module.exports = after + +function after(count, callback, err_cb) { + var bail = false + err_cb = err_cb || noop + proxy.count = count + + return (count === 0) ? callback() : proxy + + function proxy(err, result) { + if (proxy.count <= 0) { + throw new Error('after called too many times') + } + --proxy.count + + // after first error, rest are passed to err_cb + if (err) { + bail = true + callback(err) + // future error callbacks will go to error handler + callback = err_cb + } else if (proxy.count === 0 && !bail) { + callback(null, result) + } + } +} + +function noop() {} diff --git a/Server File/node_modules/after/package.json b/Server File/node_modules/after/package.json new file mode 100644 index 0000000..7e0dc39 --- /dev/null +++ b/Server File/node_modules/after/package.json @@ -0,0 +1,103 @@ +{ + "_args": [ + [ + { + "raw": "after@0.8.2", + "scope": null, + "escapedName": "after", + "name": "after", + "rawSpec": "0.8.2", + "spec": "0.8.2", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\engine.io-parser" + ] + ], + "_from": "after@0.8.2", + "_id": "after@0.8.2", + "_inCache": true, + "_location": "/after", + "_nodeVersion": "0.10.32", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/after-0.8.2.tgz_1471308639186_0.9132961586583406" + }, + "_npmUser": { + "name": "raynos", + "email": "raynos2@gmail.com" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "raw": "after@0.8.2", + "scope": null, + "escapedName": "after", + "name": "after", + "rawSpec": "0.8.2", + "spec": "0.8.2", + "type": "version" + }, + "_requiredBy": [ + "/engine.io-parser" + ], + "_resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "_shasum": "fedb394f9f0e02aa9768e702bda23b505fae7e1f", + "_shrinkwrap": null, + "_spec": "after@0.8.2", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\engine.io-parser", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "bugs": { + "url": "https://github.com/Raynos/after/issues" + }, + "contributors": [ + { + "name": "Raynos", + "email": "raynos2@gmail.com", + "url": "http://raynos.org" + } + ], + "dependencies": {}, + "description": "after - tiny flow control", + "devDependencies": { + "mocha": "~1.8.1" + }, + "directories": {}, + "dist": { + "shasum": "fedb394f9f0e02aa9768e702bda23b505fae7e1f", + "tarball": "https://registry.npmjs.org/after/-/after-0.8.2.tgz" + }, + "gitHead": "e8c26046f36962b90e68dc5df33a9672a54b25f5", + "homepage": "https://github.com/Raynos/after#readme", + "keywords": [ + "flowcontrol", + "after", + "flow", + "control", + "arch" + ], + "license": "MIT", + "maintainers": [ + { + "name": "raynos", + "email": "raynos2@gmail.com" + }, + { + "name": "defunctzombie", + "email": "shtylman@gmail.com" + } + ], + "name": "after", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/after.git" + }, + "scripts": { + "test": "mocha --ui tdd --reporter spec test/*.js" + }, + "version": "0.8.2" +} diff --git a/Server File/node_modules/after/test/after-test.js b/Server File/node_modules/after/test/after-test.js new file mode 100644 index 0000000..0d63f4c --- /dev/null +++ b/Server File/node_modules/after/test/after-test.js @@ -0,0 +1,120 @@ +/*global suite, test*/ + +var assert = require("assert") + , after = require("../") + +test("exists", function () { + assert(typeof after === "function", "after is not a function") +}) + +test("after when called with 0 invokes", function (done) { + after(0, done) +}); + +test("after 1", function (done) { + var next = after(1, done) + next() +}) + +test("after 5", function (done) { + var next = after(5, done) + , i = 5 + + while (i--) { + next() + } +}) + +test("manipulate count", function (done) { + var next = after(1, done) + , i = 5 + + next.count = i + while (i--) { + next() + } +}) + +test("after terminates on error", function (done) { + var next = after(2, function(err) { + assert.equal(err.message, 'test'); + done(); + }) + next(new Error('test')) + next(new Error('test2')) +}) + +test('gee', function(done) { + done = after(2, done) + + function cb(err) { + assert.equal(err.message, 1); + done() + } + + var next = after(3, cb, function(err) { + assert.equal(err.message, 2) + done() + }); + + next() + next(new Error(1)) + next(new Error(2)) +}) + +test('eee', function(done) { + done = after(3, done) + + function cb(err) { + assert.equal(err.message, 1); + done() + } + + var next = after(3, cb, function(err) { + assert.equal(err.message, 2) + done() + }); + + next(new Error(1)) + next(new Error(2)) + next(new Error(2)) +}) + +test('gge', function(done) { + function cb(err) { + assert.equal(err.message, 1); + done() + } + + var next = after(3, cb, function(err) { + // should not happen + assert.ok(false); + }); + + next() + next() + next(new Error(1)) +}) + +test('egg', function(done) { + function cb(err) { + assert.equal(err.message, 1); + done() + } + + var next = after(3, cb, function(err) { + // should not happen + assert.ok(false); + }); + + next(new Error(1)) + next() + next() +}) + +test('throws on too many calls', function(done) { + var next = after(1, done); + next() + assert.throws(next, /after called too many times/); +}); + diff --git a/Server File/node_modules/array-flatten/LICENSE b/Server File/node_modules/array-flatten/LICENSE new file mode 100644 index 0000000..983fbe8 --- /dev/null +++ b/Server File/node_modules/array-flatten/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Server File/node_modules/array-flatten/README.md b/Server File/node_modules/array-flatten/README.md new file mode 100644 index 0000000..91fa5b6 --- /dev/null +++ b/Server File/node_modules/array-flatten/README.md @@ -0,0 +1,43 @@ +# Array Flatten + +[![NPM version][npm-image]][npm-url] +[![NPM downloads][downloads-image]][downloads-url] +[![Build status][travis-image]][travis-url] +[![Test coverage][coveralls-image]][coveralls-url] + +> Flatten an array of nested arrays into a single flat array. Accepts an optional depth. + +## Installation + +``` +npm install array-flatten --save +``` + +## Usage + +```javascript +var flatten = require('array-flatten') + +flatten([1, [2, [3, [4, [5], 6], 7], 8], 9]) +//=> [1, 2, 3, 4, 5, 6, 7, 8, 9] + +flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2) +//=> [1, 2, 3, [4, [5], 6], 7, 8, 9] + +(function () { + flatten(arguments) //=> [1, 2, 3] +})(1, [2, 3]) +``` + +## License + +MIT + +[npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat +[npm-url]: https://npmjs.org/package/array-flatten +[downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat +[downloads-url]: https://npmjs.org/package/array-flatten +[travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat +[travis-url]: https://travis-ci.org/blakeembrey/array-flatten +[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat +[coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master diff --git a/Server File/node_modules/array-flatten/array-flatten.js b/Server File/node_modules/array-flatten/array-flatten.js new file mode 100644 index 0000000..089117b --- /dev/null +++ b/Server File/node_modules/array-flatten/array-flatten.js @@ -0,0 +1,64 @@ +'use strict' + +/** + * Expose `arrayFlatten`. + */ +module.exports = arrayFlatten + +/** + * Recursive flatten function with depth. + * + * @param {Array} array + * @param {Array} result + * @param {Number} depth + * @return {Array} + */ +function flattenWithDepth (array, result, depth) { + for (var i = 0; i < array.length; i++) { + var value = array[i] + + if (depth > 0 && Array.isArray(value)) { + flattenWithDepth(value, result, depth - 1) + } else { + result.push(value) + } + } + + return result +} + +/** + * Recursive flatten function. Omitting depth is slightly faster. + * + * @param {Array} array + * @param {Array} result + * @return {Array} + */ +function flattenForever (array, result) { + for (var i = 0; i < array.length; i++) { + var value = array[i] + + if (Array.isArray(value)) { + flattenForever(value, result) + } else { + result.push(value) + } + } + + return result +} + +/** + * Flatten an array, with the ability to define a depth. + * + * @param {Array} array + * @param {Number} depth + * @return {Array} + */ +function arrayFlatten (array, depth) { + if (depth == null) { + return flattenForever(array, []) + } + + return flattenWithDepth(array, [], depth) +} diff --git a/Server File/node_modules/array-flatten/package.json b/Server File/node_modules/array-flatten/package.json new file mode 100644 index 0000000..92b3483 --- /dev/null +++ b/Server File/node_modules/array-flatten/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + { + "raw": "array-flatten@1.1.1", + "scope": null, + "escapedName": "array-flatten", + "name": "array-flatten", + "rawSpec": "1.1.1", + "spec": "1.1.1", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express" + ] + ], + "_from": "array-flatten@1.1.1", + "_id": "array-flatten@1.1.1", + "_inCache": true, + "_location": "/array-flatten", + "_nodeVersion": "2.3.3", + "_npmUser": { + "name": "blakeembrey", + "email": "hello@blakeembrey.com" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "raw": "array-flatten@1.1.1", + "scope": null, + "escapedName": "array-flatten", + "name": "array-flatten", + "rawSpec": "1.1.1", + "spec": "1.1.1", + "type": "version" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "_shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2", + "_shrinkwrap": null, + "_spec": "array-flatten@1.1.1", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express", + "author": { + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + }, + "bugs": { + "url": "https://github.com/blakeembrey/array-flatten/issues" + }, + "dependencies": {}, + "description": "Flatten an array of nested arrays into a single flat array", + "devDependencies": { + "istanbul": "^0.3.13", + "mocha": "^2.2.4", + "pre-commit": "^1.0.7", + "standard": "^3.7.3" + }, + "directories": {}, + "dist": { + "shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2", + "tarball": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" + }, + "files": [ + "array-flatten.js", + "LICENSE" + ], + "gitHead": "1963a9189229d408e1e8f585a00c8be9edbd1803", + "homepage": "https://github.com/blakeembrey/array-flatten", + "keywords": [ + "array", + "flatten", + "arguments", + "depth" + ], + "license": "MIT", + "main": "array-flatten.js", + "maintainers": [ + { + "name": "blakeembrey", + "email": "hello@blakeembrey.com" + } + ], + "name": "array-flatten", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/blakeembrey/array-flatten.git" + }, + "scripts": { + "test": "istanbul cover _mocha -- -R spec" + }, + "version": "1.1.1" +} diff --git a/Server File/node_modules/arraybuffer.slice/.npmignore b/Server File/node_modules/arraybuffer.slice/.npmignore new file mode 100644 index 0000000..cfbee8d --- /dev/null +++ b/Server File/node_modules/arraybuffer.slice/.npmignore @@ -0,0 +1,17 @@ +lib-cov +lcov.info +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results +build +.grunt + +node_modules diff --git a/Server File/node_modules/arraybuffer.slice/Makefile b/Server File/node_modules/arraybuffer.slice/Makefile new file mode 100644 index 0000000..849887f --- /dev/null +++ b/Server File/node_modules/arraybuffer.slice/Makefile @@ -0,0 +1,8 @@ + +REPORTER = dot + +test: + @./node_modules/.bin/mocha \ + --reporter $(REPORTER) + +.PHONY: test diff --git a/Server File/node_modules/arraybuffer.slice/README.md b/Server File/node_modules/arraybuffer.slice/README.md new file mode 100644 index 0000000..15e465e --- /dev/null +++ b/Server File/node_modules/arraybuffer.slice/README.md @@ -0,0 +1,17 @@ +# How to +```javascript +var sliceBuffer = require('arraybuffer.slice'); +var ab = (new Int8Array(5)).buffer; +var sliced = sliceBuffer(ab, 1, 3); +sliced = sliceBuffer(ab, 1); +``` + +# Licence (MIT) +Copyright (C) 2013 Rase- + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Server File/node_modules/arraybuffer.slice/index.js b/Server File/node_modules/arraybuffer.slice/index.js new file mode 100644 index 0000000..11ac556 --- /dev/null +++ b/Server File/node_modules/arraybuffer.slice/index.js @@ -0,0 +1,29 @@ +/** + * An abstraction for slicing an arraybuffer even when + * ArrayBuffer.prototype.slice is not supported + * + * @api public + */ + +module.exports = function(arraybuffer, start, end) { + var bytes = arraybuffer.byteLength; + start = start || 0; + end = end || bytes; + + if (arraybuffer.slice) { return arraybuffer.slice(start, end); } + + if (start < 0) { start += bytes; } + if (end < 0) { end += bytes; } + if (end > bytes) { end = bytes; } + + if (start >= bytes || start >= end || bytes === 0) { + return new ArrayBuffer(0); + } + + var abv = new Uint8Array(arraybuffer); + var result = new Uint8Array(end - start); + for (var i = start, ii = 0; i < end; i++, ii++) { + result[ii] = abv[i]; + } + return result.buffer; +}; diff --git a/Server File/node_modules/arraybuffer.slice/package.json b/Server File/node_modules/arraybuffer.slice/package.json new file mode 100644 index 0000000..ef0a3d0 --- /dev/null +++ b/Server File/node_modules/arraybuffer.slice/package.json @@ -0,0 +1,72 @@ +{ + "_args": [ + [ + { + "raw": "arraybuffer.slice@0.0.6", + "scope": null, + "escapedName": "arraybuffer.slice", + "name": "arraybuffer.slice", + "rawSpec": "0.0.6", + "spec": "0.0.6", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\engine.io-parser" + ] + ], + "_from": "arraybuffer.slice@0.0.6", + "_id": "arraybuffer.slice@0.0.6", + "_inCache": true, + "_location": "/arraybuffer.slice", + "_npmUser": { + "name": "rase-", + "email": "tonykovanen@hotmail.com" + }, + "_npmVersion": "1.3.5", + "_phantomChildren": {}, + "_requested": { + "raw": "arraybuffer.slice@0.0.6", + "scope": null, + "escapedName": "arraybuffer.slice", + "name": "arraybuffer.slice", + "rawSpec": "0.0.6", + "spec": "0.0.6", + "type": "version" + }, + "_requiredBy": [ + "/engine.io-parser" + ], + "_resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", + "_shasum": "f33b2159f0532a3f3107a272c0ccfbd1ad2979ca", + "_shrinkwrap": null, + "_spec": "arraybuffer.slice@0.0.6", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\engine.io-parser", + "bugs": { + "url": "https://github.com/rase-/arraybuffer.slice/issues" + }, + "dependencies": {}, + "description": "Exports a function for slicing ArrayBuffers (no polyfilling)", + "devDependencies": { + "expect.js": "0.2.0", + "mocha": "1.17.1" + }, + "directories": {}, + "dist": { + "shasum": "f33b2159f0532a3f3107a272c0ccfbd1ad2979ca", + "tarball": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz" + }, + "homepage": "https://github.com/rase-/arraybuffer.slice", + "maintainers": [ + { + "name": "rase-", + "email": "tonykovanen@hotmail.com" + } + ], + "name": "arraybuffer.slice", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/rase-/arraybuffer.slice.git" + }, + "version": "0.0.6" +} diff --git a/Server File/node_modules/arraybuffer.slice/test/slice-buffer.js b/Server File/node_modules/arraybuffer.slice/test/slice-buffer.js new file mode 100644 index 0000000..4778da6 --- /dev/null +++ b/Server File/node_modules/arraybuffer.slice/test/slice-buffer.js @@ -0,0 +1,227 @@ +/* + * Test dependencies + */ + +var sliceBuffer = require('../index.js'); +var expect = require('expect.js'); + +/** + * Tests + */ + +describe('sliceBuffer', function() { + describe('using standard slice', function() { + it('should slice correctly with only start provided', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 3); + var sabv = new Uint8Array(sliced); + for (var i = 3, ii = 0; i < abv.length; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with start and end provided', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 3, 8); + var sabv = new Uint8Array(sliced); + for (var i = 3, ii = 0; i < 8; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative start', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, -3); + var sabv = new Uint8Array(sliced); + for (var i = abv.length - 3, ii = 0; i < abv.length; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 0, -3); + var sabv = new Uint8Array(sliced); + for (var i = 0, ii = 0; i < abv.length - 3; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative start and end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, -6, -3); + var sabv = new Uint8Array(sliced); + for (var i = abv.length - 6, ii = 0; i < abv.length - 3; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with equal start and end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 1, 1); + expect(sliced.byteLength).to.equal(0); + }); + + it('should slice correctly when end larger than buffer', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 0, 100); + expect(new Uint8Array(sliced)).to.eql(abv); + }); + + it('shoud slice correctly when start larger than end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 6, 5); + expect(sliced.byteLength).to.equal(0); + }); + }); + + describe('using fallback', function() { + it('should slice correctly with only start provided', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 3); + var sabv = new Uint8Array(sliced); + for (var i = 3, ii = 0; i < abv.length; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with start and end provided', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + + var sliced = sliceBuffer(ab, 3, 8); + var sabv = new Uint8Array(sliced); + for (var i = 3, ii = 0; i < 8; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative start', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + + var sliced = sliceBuffer(ab, -3); + var sabv = new Uint8Array(sliced); + for (var i = abv.length - 3, ii = 0; i < abv.length; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 0, -3); + var sabv = new Uint8Array(sliced); + for (var i = 0, ii = 0; i < abv.length - 3; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative start and end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, -6, -3); + var sabv = new Uint8Array(sliced); + for (var i = abv.length - 6, ii = 0; i < abv.length - 3; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with equal start and end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 1, 1); + expect(sliced.byteLength).to.equal(0); + }); + + it('should slice correctly when end larger than buffer', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 0, 100); + var sabv = new Uint8Array(sliced); + for (var i = 0; i < abv.length; i++) { + expect(abv[i]).to.equal(sabv[i]); + } + }); + + it('shoud slice correctly when start larger than end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 6, 5); + expect(sliced.byteLength).to.equal(0); + }); + }); +}); diff --git a/Server File/node_modules/backo2/.npmignore b/Server File/node_modules/backo2/.npmignore new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/Server File/node_modules/backo2/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/Server File/node_modules/backo2/History.md b/Server File/node_modules/backo2/History.md new file mode 100644 index 0000000..8eb28b8 --- /dev/null +++ b/Server File/node_modules/backo2/History.md @@ -0,0 +1,12 @@ + +1.0.1 / 2014-02-17 +================== + + * go away decimal point + * history + +1.0.0 / 2014-02-17 +================== + + * add jitter option + * Initial commit diff --git a/Server File/node_modules/backo2/Makefile b/Server File/node_modules/backo2/Makefile new file mode 100644 index 0000000..9987df8 --- /dev/null +++ b/Server File/node_modules/backo2/Makefile @@ -0,0 +1,8 @@ + +test: + @./node_modules/.bin/mocha \ + --require should \ + --reporter dot \ + --bail + +.PHONY: test \ No newline at end of file diff --git a/Server File/node_modules/backo2/Readme.md b/Server File/node_modules/backo2/Readme.md new file mode 100644 index 0000000..0df2a39 --- /dev/null +++ b/Server File/node_modules/backo2/Readme.md @@ -0,0 +1,34 @@ +# backo + + Simple exponential backoff because the others seem to have weird abstractions. + +## Installation + +``` +$ npm install backo +``` + +## Options + + - `min` initial timeout in milliseconds [100] + - `max` max timeout [10000] + - `jitter` [0] + - `factor` [2] + +## Example + +```js +var Backoff = require('backo'); +var backoff = new Backoff({ min: 100, max: 20000 }); + +setTimeout(function(){ + something.reconnect(); +}, backoff.duration()); + +// later when something works +backoff.reset() +``` + +# License + + MIT diff --git a/Server File/node_modules/backo2/component.json b/Server File/node_modules/backo2/component.json new file mode 100644 index 0000000..994845a --- /dev/null +++ b/Server File/node_modules/backo2/component.json @@ -0,0 +1,11 @@ +{ + "name": "backo", + "repo": "segmentio/backo", + "dependencies": {}, + "version": "1.0.1", + "description": "simple backoff without the weird abstractions", + "keywords": ["backoff"], + "license": "MIT", + "scripts": ["index.js"], + "main": "index.js" +} diff --git a/Server File/node_modules/backo2/index.js b/Server File/node_modules/backo2/index.js new file mode 100644 index 0000000..fac4429 --- /dev/null +++ b/Server File/node_modules/backo2/index.js @@ -0,0 +1,85 @@ + +/** + * Expose `Backoff`. + */ + +module.exports = Backoff; + +/** + * Initialize backoff timer with `opts`. + * + * - `min` initial timeout in milliseconds [100] + * - `max` max timeout [10000] + * - `jitter` [0] + * - `factor` [2] + * + * @param {Object} opts + * @api public + */ + +function Backoff(opts) { + opts = opts || {}; + this.ms = opts.min || 100; + this.max = opts.max || 10000; + this.factor = opts.factor || 2; + this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0; + this.attempts = 0; +} + +/** + * Return the backoff duration. + * + * @return {Number} + * @api public + */ + +Backoff.prototype.duration = function(){ + var ms = this.ms * Math.pow(this.factor, this.attempts++); + if (this.jitter) { + var rand = Math.random(); + var deviation = Math.floor(rand * this.jitter * ms); + ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation; + } + return Math.min(ms, this.max) | 0; +}; + +/** + * Reset the number of attempts. + * + * @api public + */ + +Backoff.prototype.reset = function(){ + this.attempts = 0; +}; + +/** + * Set the minimum duration + * + * @api public + */ + +Backoff.prototype.setMin = function(min){ + this.ms = min; +}; + +/** + * Set the maximum duration + * + * @api public + */ + +Backoff.prototype.setMax = function(max){ + this.max = max; +}; + +/** + * Set the jitter + * + * @api public + */ + +Backoff.prototype.setJitter = function(jitter){ + this.jitter = jitter; +}; + diff --git a/Server File/node_modules/backo2/package.json b/Server File/node_modules/backo2/package.json new file mode 100644 index 0000000..2c8ab8b --- /dev/null +++ b/Server File/node_modules/backo2/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + { + "raw": "backo2@1.0.2", + "scope": null, + "escapedName": "backo2", + "name": "backo2", + "rawSpec": "1.0.2", + "spec": "1.0.2", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\socket.io-client" + ] + ], + "_from": "backo2@1.0.2", + "_id": "backo2@1.0.2", + "_inCache": true, + "_location": "/backo2", + "_npmUser": { + "name": "mokesmokes", + "email": "mokesmokes@gmail.com" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "backo2@1.0.2", + "scope": null, + "escapedName": "backo2", + "name": "backo2", + "rawSpec": "1.0.2", + "spec": "1.0.2", + "type": "version" + }, + "_requiredBy": [ + "/socket.io-client" + ], + "_resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "_shasum": "31ab1ac8b129363463e35b3ebb69f4dfcfba7947", + "_shrinkwrap": null, + "_spec": "backo2@1.0.2", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\socket.io-client", + "bugs": { + "url": "https://github.com/mokesmokes/backo/issues" + }, + "dependencies": {}, + "description": "simple backoff based on segmentio/backo", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "31ab1ac8b129363463e35b3ebb69f4dfcfba7947", + "tarball": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz" + }, + "gitHead": "3e695bade7756fef2295e8883bf3570a06e5d9ec", + "homepage": "https://github.com/mokesmokes/backo", + "keywords": [ + "backoff" + ], + "license": "MIT", + "maintainers": [ + { + "name": "mokesmokes", + "email": "mokesmokes@gmail.com" + } + ], + "name": "backo2", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/mokesmokes/backo.git" + }, + "scripts": {}, + "version": "1.0.2" +} diff --git a/Server File/node_modules/backo2/test/index.js b/Server File/node_modules/backo2/test/index.js new file mode 100644 index 0000000..ea1f6de --- /dev/null +++ b/Server File/node_modules/backo2/test/index.js @@ -0,0 +1,18 @@ + +var Backoff = require('..'); +var assert = require('assert'); + +describe('.duration()', function(){ + it('should increase the backoff', function(){ + var b = new Backoff; + + assert(100 == b.duration()); + assert(200 == b.duration()); + assert(400 == b.duration()); + assert(800 == b.duration()); + + b.reset(); + assert(100 == b.duration()); + assert(200 == b.duration()); + }) +}) \ No newline at end of file diff --git a/Server File/node_modules/base64-arraybuffer/.npmignore b/Server File/node_modules/base64-arraybuffer/.npmignore new file mode 100644 index 0000000..332ee5a --- /dev/null +++ b/Server File/node_modules/base64-arraybuffer/.npmignore @@ -0,0 +1,3 @@ +/node_modules/ +Gruntfile.js +/test/ diff --git a/Server File/node_modules/base64-arraybuffer/.travis.yml b/Server File/node_modules/base64-arraybuffer/.travis.yml new file mode 100644 index 0000000..19259a5 --- /dev/null +++ b/Server File/node_modules/base64-arraybuffer/.travis.yml @@ -0,0 +1,19 @@ +language: node_js +node_js: +- '0.12' +- iojs-1 +- iojs-2 +- iojs-3 +- '4.1' +before_script: +- npm install +before_install: npm install -g npm@'>=2.13.5' +deploy: + provider: npm + email: niklasvh@gmail.com + api_key: + secure: oHV9ArprTj5WOk7MP1UF7QMJ70huXw+y7xXb5wF4+V2H8Hyfa5TfE0DiOmqrube1WXTeH1FLgq54shp/sJWi47Hkg/GyeoB5NnsPhYEaJkaON9UG5blML+ODiNVsEnq/1kNBQ8e0+0JItMPLGySKyFmuZ3yflulXKS8O88mfINo= + on: + tags: true + branch: master + repo: niklasvh/base64-arraybuffer diff --git a/Server File/node_modules/base64-arraybuffer/LICENSE-MIT b/Server File/node_modules/base64-arraybuffer/LICENSE-MIT new file mode 100644 index 0000000..ed27b41 --- /dev/null +++ b/Server File/node_modules/base64-arraybuffer/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2012 Niklas von Hertzen + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/Server File/node_modules/base64-arraybuffer/README.md b/Server File/node_modules/base64-arraybuffer/README.md new file mode 100644 index 0000000..50009e4 --- /dev/null +++ b/Server File/node_modules/base64-arraybuffer/README.md @@ -0,0 +1,20 @@ +# base64-arraybuffer + +[![Build Status](https://travis-ci.org/niklasvh/base64-arraybuffer.png)](https://travis-ci.org/niklasvh/base64-arraybuffer) +[![NPM Downloads](https://img.shields.io/npm/dm/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer) +[![NPM Version](https://img.shields.io/npm/v/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer) + +Encode/decode base64 data into ArrayBuffers + +## Getting Started +Install the module with: `npm install base64-arraybuffer` + +## API +The library encodes and decodes base64 to and from ArrayBuffers + + - __encode(buffer)__ - Encodes `ArrayBuffer` into base64 string + - __decode(str)__ - Decodes base64 string to `ArrayBuffer` + +## License +Copyright (c) 2012 Niklas von Hertzen +Licensed under the MIT license. diff --git a/Server File/node_modules/base64-arraybuffer/lib/base64-arraybuffer.js b/Server File/node_modules/base64-arraybuffer/lib/base64-arraybuffer.js new file mode 100644 index 0000000..e6b6306 --- /dev/null +++ b/Server File/node_modules/base64-arraybuffer/lib/base64-arraybuffer.js @@ -0,0 +1,67 @@ +/* + * base64-arraybuffer + * https://github.com/niklasvh/base64-arraybuffer + * + * Copyright (c) 2012 Niklas von Hertzen + * Licensed under the MIT license. + */ +(function(){ + "use strict"; + + var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + // Use a lookup table to find the index. + var lookup = new Uint8Array(256); + for (var i = 0; i < chars.length; i++) { + lookup[chars.charCodeAt(i)] = i; + } + + exports.encode = function(arraybuffer) { + var bytes = new Uint8Array(arraybuffer), + i, len = bytes.length, base64 = ""; + + for (i = 0; i < len; i+=3) { + base64 += chars[bytes[i] >> 2]; + base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)]; + base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)]; + base64 += chars[bytes[i + 2] & 63]; + } + + if ((len % 3) === 2) { + base64 = base64.substring(0, base64.length - 1) + "="; + } else if (len % 3 === 1) { + base64 = base64.substring(0, base64.length - 2) + "=="; + } + + return base64; + }; + + exports.decode = function(base64) { + var bufferLength = base64.length * 0.75, + len = base64.length, i, p = 0, + encoded1, encoded2, encoded3, encoded4; + + if (base64[base64.length - 1] === "=") { + bufferLength--; + if (base64[base64.length - 2] === "=") { + bufferLength--; + } + } + + var arraybuffer = new ArrayBuffer(bufferLength), + bytes = new Uint8Array(arraybuffer); + + for (i = 0; i < len; i+=4) { + encoded1 = lookup[base64.charCodeAt(i)]; + encoded2 = lookup[base64.charCodeAt(i+1)]; + encoded3 = lookup[base64.charCodeAt(i+2)]; + encoded4 = lookup[base64.charCodeAt(i+3)]; + + bytes[p++] = (encoded1 << 2) | (encoded2 >> 4); + bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2); + bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63); + } + + return arraybuffer; + }; +})(); diff --git a/Server File/node_modules/base64-arraybuffer/package.json b/Server File/node_modules/base64-arraybuffer/package.json new file mode 100644 index 0000000..2e41b1a --- /dev/null +++ b/Server File/node_modules/base64-arraybuffer/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + { + "raw": "base64-arraybuffer@0.1.5", + "scope": null, + "escapedName": "base64-arraybuffer", + "name": "base64-arraybuffer", + "rawSpec": "0.1.5", + "spec": "0.1.5", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\engine.io-parser" + ] + ], + "_from": "base64-arraybuffer@0.1.5", + "_id": "base64-arraybuffer@0.1.5", + "_inCache": true, + "_location": "/base64-arraybuffer", + "_nodeVersion": "2.5.0", + "_npmUser": { + "name": "niklasvh", + "email": "niklasvh@gmail.com" + }, + "_npmVersion": "3.4.0", + "_phantomChildren": {}, + "_requested": { + "raw": "base64-arraybuffer@0.1.5", + "scope": null, + "escapedName": "base64-arraybuffer", + "name": "base64-arraybuffer", + "rawSpec": "0.1.5", + "spec": "0.1.5", + "type": "version" + }, + "_requiredBy": [ + "/engine.io-parser", + "/socket.io-client" + ], + "_resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "_shasum": "73926771923b5a19747ad666aa5cd4bf9c6e9ce8", + "_shrinkwrap": null, + "_spec": "base64-arraybuffer@0.1.5", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\engine.io-parser", + "author": { + "name": "Niklas von Hertzen", + "email": "niklasvh@gmail.com", + "url": "http://hertzen.com" + }, + "bugs": { + "url": "https://github.com/niklasvh/base64-arraybuffer/issues" + }, + "dependencies": {}, + "description": "Encode/decode base64 data into ArrayBuffers", + "devDependencies": { + "grunt": "^0.4.5", + "grunt-cli": "^0.1.13", + "grunt-contrib-jshint": "^0.11.2", + "grunt-contrib-nodeunit": "^0.4.1", + "grunt-contrib-watch": "^0.6.1" + }, + "directories": {}, + "dist": { + "shasum": "73926771923b5a19747ad666aa5cd4bf9c6e9ce8", + "tarball": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz" + }, + "engines": { + "node": ">= 0.6.0" + }, + "gitHead": "e9457ccb7b140f5ae54a2880c8e9b967ffb03a7d", + "homepage": "https://github.com/niklasvh/base64-arraybuffer", + "keywords": [], + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/niklasvh/base64-arraybuffer/blob/master/LICENSE-MIT" + } + ], + "main": "lib/base64-arraybuffer", + "maintainers": [ + { + "name": "niklasvh", + "email": "niklasvh@gmail.com" + } + ], + "name": "base64-arraybuffer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/niklasvh/base64-arraybuffer.git" + }, + "scripts": { + "test": "grunt nodeunit" + }, + "version": "0.1.5" +} diff --git a/Server File/node_modules/base64id/.npmignore b/Server File/node_modules/base64id/.npmignore new file mode 100644 index 0000000..39e9864 --- /dev/null +++ b/Server File/node_modules/base64id/.npmignore @@ -0,0 +1,3 @@ +support +test +examples diff --git a/Server File/node_modules/base64id/LICENSE b/Server File/node_modules/base64id/LICENSE new file mode 100644 index 0000000..0d03c83 --- /dev/null +++ b/Server File/node_modules/base64id/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2012-2016 Kristian Faeldt + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Server File/node_modules/base64id/README.md b/Server File/node_modules/base64id/README.md new file mode 100644 index 0000000..17689e6 --- /dev/null +++ b/Server File/node_modules/base64id/README.md @@ -0,0 +1,18 @@ +base64id +======== + +Node.js module that generates a base64 id. + +Uses crypto.randomBytes when available, falls back to unsafe methods for node.js <= 0.4. + +To increase performance, random bytes are buffered to minimize the number of synchronous calls to crypto.randomBytes. + +## Installation + + $ npm install base64id + +## Usage + + var base64id = require('base64id'); + + var id = base64id.generateId(); diff --git a/Server File/node_modules/base64id/lib/base64id.js b/Server File/node_modules/base64id/lib/base64id.js new file mode 100644 index 0000000..f688159 --- /dev/null +++ b/Server File/node_modules/base64id/lib/base64id.js @@ -0,0 +1,103 @@ +/*! + * base64id v0.1.0 + */ + +/** + * Module dependencies + */ + +var crypto = require('crypto'); + +/** + * Constructor + */ + +var Base64Id = function() { }; + +/** + * Get random bytes + * + * Uses a buffer if available, falls back to crypto.randomBytes + */ + +Base64Id.prototype.getRandomBytes = function(bytes) { + + var BUFFER_SIZE = 4096 + var self = this; + + bytes = bytes || 12; + + if (bytes > BUFFER_SIZE) { + return crypto.randomBytes(bytes); + } + + var bytesInBuffer = parseInt(BUFFER_SIZE/bytes); + var threshold = parseInt(bytesInBuffer*0.85); + + if (!threshold) { + return crypto.randomBytes(bytes); + } + + if (this.bytesBufferIndex == null) { + this.bytesBufferIndex = -1; + } + + if (this.bytesBufferIndex == bytesInBuffer) { + this.bytesBuffer = null; + this.bytesBufferIndex = -1; + } + + // No buffered bytes available or index above threshold + if (this.bytesBufferIndex == -1 || this.bytesBufferIndex > threshold) { + + if (!this.isGeneratingBytes) { + this.isGeneratingBytes = true; + crypto.randomBytes(BUFFER_SIZE, function(err, bytes) { + self.bytesBuffer = bytes; + self.bytesBufferIndex = 0; + self.isGeneratingBytes = false; + }); + } + + // Fall back to sync call when no buffered bytes are available + if (this.bytesBufferIndex == -1) { + return crypto.randomBytes(bytes); + } + } + + var result = this.bytesBuffer.slice(bytes*this.bytesBufferIndex, bytes*(this.bytesBufferIndex+1)); + this.bytesBufferIndex++; + + return result; +} + +/** + * Generates a base64 id + * + * (Original version from socket.io ) + */ + +Base64Id.prototype.generateId = function () { + var rand = new Buffer(15); // multiple of 3 for base64 + if (!rand.writeInt32BE) { + return Math.abs(Math.random() * Math.random() * Date.now() | 0).toString() + + Math.abs(Math.random() * Math.random() * Date.now() | 0).toString(); + } + this.sequenceNumber = (this.sequenceNumber + 1) | 0; + rand.writeInt32BE(this.sequenceNumber, 11); + if (crypto.randomBytes) { + this.getRandomBytes(12).copy(rand); + } else { + // not secure for node 0.4 + [0, 4, 8].forEach(function(i) { + rand.writeInt32BE(Math.random() * Math.pow(2, 32) | 0, i); + }); + } + return rand.toString('base64').replace(/\//g, '_').replace(/\+/g, '-'); +}; + +/** + * Export + */ + +exports = module.exports = new Base64Id(); diff --git a/Server File/node_modules/base64id/package.json b/Server File/node_modules/base64id/package.json new file mode 100644 index 0000000..6a927a7 --- /dev/null +++ b/Server File/node_modules/base64id/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + { + "raw": "base64id@1.0.0", + "scope": null, + "escapedName": "base64id", + "name": "base64id", + "rawSpec": "1.0.0", + "spec": "1.0.0", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\engine.io" + ] + ], + "_from": "base64id@1.0.0", + "_id": "base64id@1.0.0", + "_inCache": true, + "_location": "/base64id", + "_nodeVersion": "4.4.7", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/base64id-1.0.0.tgz_1480551701495_0.042360062478110194" + }, + "_npmUser": { + "name": "darrachequesne", + "email": "damien.arrachequesne@gmail.com" + }, + "_npmVersion": "2.15.8", + "_phantomChildren": {}, + "_requested": { + "raw": "base64id@1.0.0", + "scope": null, + "escapedName": "base64id", + "name": "base64id", + "rawSpec": "1.0.0", + "spec": "1.0.0", + "type": "version" + }, + "_requiredBy": [ + "/engine.io" + ], + "_resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", + "_shasum": "47688cb99bb6804f0e06d3e763b1c32e57d8e6b6", + "_shrinkwrap": null, + "_spec": "base64id@1.0.0", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\engine.io", + "author": { + "name": "Kristian Faeldt", + "email": "faeldt_kristian@cyberagent.co.jp" + }, + "bugs": { + "url": "https://github.com/faeldt/base64id/issues" + }, + "dependencies": {}, + "description": "Generates a base64 id", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "47688cb99bb6804f0e06d3e763b1c32e57d8e6b6", + "tarball": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz" + }, + "engines": { + "node": ">= 0.4.0" + }, + "gitHead": "3c846f0818ff88b683ad39fde2f8e015ce0f9807", + "homepage": "https://github.com/faeldt/base64id#readme", + "license": "MIT", + "main": "./lib/base64id.js", + "maintainers": [ + { + "name": "darrachequesne", + "email": "damien.arrachequesne@gmail.com" + }, + { + "name": "faeldt_kristian", + "email": "kristian.faeldt@gmail.com" + } + ], + "name": "base64id", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/faeldt/base64id.git" + }, + "scripts": {}, + "version": "1.0.0" +} diff --git a/Server File/node_modules/better-assert/.npmignore b/Server File/node_modules/better-assert/.npmignore new file mode 100644 index 0000000..f1250e5 --- /dev/null +++ b/Server File/node_modules/better-assert/.npmignore @@ -0,0 +1,4 @@ +support +test +examples +*.sock diff --git a/Server File/node_modules/better-assert/History.md b/Server File/node_modules/better-assert/History.md new file mode 100644 index 0000000..cbb579b --- /dev/null +++ b/Server File/node_modules/better-assert/History.md @@ -0,0 +1,15 @@ + +1.0.0 / 2013-02-03 +================== + + * Stop using the removed magic __stack global getter + +0.1.0 / 2012-10-04 +================== + + * add throwing of AssertionError for test frameworks etc + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/Server File/node_modules/better-assert/Makefile b/Server File/node_modules/better-assert/Makefile new file mode 100644 index 0000000..36a3ed7 --- /dev/null +++ b/Server File/node_modules/better-assert/Makefile @@ -0,0 +1,5 @@ + +test: + @echo "populate me" + +.PHONY: test \ No newline at end of file diff --git a/Server File/node_modules/better-assert/Readme.md b/Server File/node_modules/better-assert/Readme.md new file mode 100644 index 0000000..d8d3a63 --- /dev/null +++ b/Server File/node_modules/better-assert/Readme.md @@ -0,0 +1,61 @@ + +# better-assert + + Better c-style assertions using [callsite](https://github.com/visionmedia/callsite) for + self-documenting failure messages. + +## Installation + + $ npm install better-assert + +## Example + + By default assertions are enabled, however the __NO_ASSERT__ environment variable + will deactivate them when truthy. + +```js +var assert = require('better-assert'); + +test(); + +function test() { + var user = { name: 'tobi' }; + assert('tobi' == user.name); + assert('number' == typeof user.age); +} + +AssertionError: 'number' == typeof user.age + at test (/Users/tj/projects/better-assert/example.js:9:3) + at Object. (/Users/tj/projects/better-assert/example.js:4:1) + at Module._compile (module.js:449:26) + at Object.Module._extensions..js (module.js:467:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Module.runMain (module.js:492:10) + at process.startup.processNextTick.process._tickCallback (node.js:244:9) +``` + +## License + +(The MIT License) + +Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Server File/node_modules/better-assert/example.js b/Server File/node_modules/better-assert/example.js new file mode 100644 index 0000000..688c29e --- /dev/null +++ b/Server File/node_modules/better-assert/example.js @@ -0,0 +1,10 @@ + +var assert = require('./'); + +test(); + +function test() { + var user = { name: 'tobi' }; + assert('tobi' == user.name); + assert('number' == typeof user.age); +} \ No newline at end of file diff --git a/Server File/node_modules/better-assert/index.js b/Server File/node_modules/better-assert/index.js new file mode 100644 index 0000000..fd1c9b7 --- /dev/null +++ b/Server File/node_modules/better-assert/index.js @@ -0,0 +1,38 @@ +/** + * Module dependencies. + */ + +var AssertionError = require('assert').AssertionError + , callsite = require('callsite') + , fs = require('fs') + +/** + * Expose `assert`. + */ + +module.exports = process.env.NO_ASSERT + ? function(){} + : assert; + +/** + * Assert the given `expr`. + */ + +function assert(expr) { + if (expr) return; + + var stack = callsite(); + var call = stack[1]; + var file = call.getFileName(); + var lineno = call.getLineNumber(); + var src = fs.readFileSync(file, 'utf8'); + var line = src.split('\n')[lineno-1]; + var src = line.match(/assert\((.*)\)/)[1]; + + var err = new AssertionError({ + message: src, + stackStartFunction: stack[0].getFunction() + }); + + throw err; +} diff --git a/Server File/node_modules/better-assert/package.json b/Server File/node_modules/better-assert/package.json new file mode 100644 index 0000000..768cff8 --- /dev/null +++ b/Server File/node_modules/better-assert/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + { + "raw": "better-assert@~1.0.0", + "scope": null, + "escapedName": "better-assert", + "name": "better-assert", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\parsejson" + ] + ], + "_from": "better-assert@>=1.0.0 <1.1.0", + "_id": "better-assert@1.0.2", + "_inCache": true, + "_location": "/better-assert", + "_npmUser": { + "name": "tony_ado", + "email": "coolhzb@163.com" + }, + "_npmVersion": "1.4.9", + "_phantomChildren": {}, + "_requested": { + "raw": "better-assert@~1.0.0", + "scope": null, + "escapedName": "better-assert", + "name": "better-assert", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/parsejson", + "/parseqs", + "/parseuri" + ], + "_resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "_shasum": "40866b9e1b9e0b55b481894311e68faffaebc522", + "_shrinkwrap": null, + "_spec": "better-assert@~1.0.0", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\parsejson", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "bugs": { + "url": "https://github.com/visionmedia/better-assert/issues" + }, + "contributors": [ + { + "name": "TonyHe", + "email": "coolhzb@163.com" + }, + { + "name": "ForbesLindesay" + } + ], + "dependencies": { + "callsite": "1.0.0" + }, + "description": "Better assertions for node, reporting the expr, filename, lineno etc", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "40866b9e1b9e0b55b481894311e68faffaebc522", + "tarball": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz" + }, + "engines": { + "node": "*" + }, + "homepage": "https://github.com/visionmedia/better-assert", + "keywords": [ + "assert", + "stack", + "trace", + "debug" + ], + "main": "index", + "maintainers": [ + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + }, + { + "name": "tony_ado", + "email": "coolhzb@163.com" + } + ], + "name": "better-assert", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/visionmedia/better-assert.git" + }, + "version": "1.0.2" +} diff --git a/Server File/node_modules/bignumber.js/LICENCE b/Server File/node_modules/bignumber.js/LICENCE new file mode 100644 index 0000000..60045e8 --- /dev/null +++ b/Server File/node_modules/bignumber.js/LICENCE @@ -0,0 +1,23 @@ +The MIT Licence. + +Copyright (c) 2012 Michael Mclaughlin + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/Server File/node_modules/bignumber.js/README.md b/Server File/node_modules/bignumber.js/README.md new file mode 100644 index 0000000..b8fc0f8 --- /dev/null +++ b/Server File/node_modules/bignumber.js/README.md @@ -0,0 +1,389 @@ +![bignumber.js](https://raw.githubusercontent.com/MikeMcl/bignumber.js/gh-pages/bignumberjs.png) + +A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic. + +[![Build Status](https://travis-ci.org/MikeMcl/bignumber.js.svg)](https://travis-ci.org/MikeMcl/bignumber.js) + +
+ +## Features + + - Faster, smaller, and perhaps easier to use than JavaScript versions of Java's BigDecimal + - 8 KB minified and gzipped + - Simple API but full-featured + - Works with numbers with or without fraction digits in bases from 2 to 64 inclusive + - Replicates the `toExponential`, `toFixed`, `toPrecision` and `toString` methods of JavaScript's Number type + - Includes a `toFraction` and a correctly-rounded `squareRoot` method + - Supports cryptographically-secure pseudo-random number generation + - No dependencies + - Wide platform compatibility: uses JavaScript 1.5 (ECMAScript 3) features only + - Comprehensive [documentation](http://mikemcl.github.io/bignumber.js/) and test set + +![API](https://raw.githubusercontent.com/MikeMcl/bignumber.js/gh-pages/API.png) + +If a smaller and simpler library is required see [big.js](https://github.com/MikeMcl/big.js/). +It's less than half the size but only works with decimal numbers and only has half the methods. +It also does not allow `NaN` or `Infinity`, or have the configuration options of this library. + +See also [decimal.js](https://github.com/MikeMcl/decimal.js/), which among other things adds support for non-integer powers, and performs all operations to a specified number of significant digits. + +## Load + +The library is the single JavaScript file *bignumber.js* (or minified, *bignumber.min.js*). + +```html + +``` + +For [Node.js](http://nodejs.org), the library is available from the [npm](https://npmjs.org/) registry + + $ npm install bignumber.js + +```javascript +var BigNumber = require('bignumber.js'); +``` + +To load with AMD loader libraries such as [requireJS](http://requirejs.org/): + +```javascript +require(['path/to/bignumber'], function(BigNumber) { + // Use BigNumber here in local scope. No global BigNumber. +}); +``` + +## Use + +*In all examples below, `var`, semicolons and `toString` calls are not shown. +If a commented-out value is in quotes it means `toString` has been called on the preceding expression.* + +The library exports a single function: `BigNumber`, the constructor of BigNumber instances. + +It accepts a value of type number *(up to 15 significant digits only)*, string or BigNumber object, + +```javascript +x = new BigNumber(123.4567) +y = BigNumber('123456.7e-3') +z = new BigNumber(x) +x.equals(y) && y.equals(z) && x.equals(z) // true +``` + + +and a base from 2 to 64 inclusive can be specified. + +```javascript +x = new BigNumber(1011, 2) // "11" +y = new BigNumber('zz.9', 36) // "1295.25" +z = x.plus(y) // "1306.25" +``` + +A BigNumber is immutable in the sense that it is not changed by its methods. + +```javascript +0.3 - 0.1 // 0.19999999999999998 +x = new BigNumber(0.3) +x.minus(0.1) // "0.2" +x // "0.3" +``` + +The methods that return a BigNumber can be chained. + +```javascript +x.dividedBy(y).plus(z).times(9).floor() +x.times('1.23456780123456789e+9').plus(9876.5432321).dividedBy('4444562598.111772').ceil() +``` + +Many method names have a shorter alias. + +```javascript +x.squareRoot().dividedBy(y).toPower(3).equals(x.sqrt().div(y).pow(3)) // true +x.cmp(y.mod(z).neg()) == 1 && x.comparedTo(y.modulo(z).negated()) == 1 // true +``` + +Like JavaScript's number type, there are `toExponential`, `toFixed` and `toPrecision` methods + +```javascript +x = new BigNumber(255.5) +x.toExponential(5) // "2.55500e+2" +x.toFixed(5) // "255.50000" +x.toPrecision(5) // "255.50" +x.toNumber() // 255.5 +``` + + and a base can be specified for `toString`. + + ```javascript + x.toString(16) // "ff.8" + ``` + +There is also a `toFormat` method which may be useful for internationalisation + +```javascript +y = new BigNumber('1234567.898765') +y.toFormat(2) // "1,234,567.90" +``` + +The maximum number of decimal places of the result of an operation involving division (i.e. a division, square root, base conversion or negative power operation) is set using the `config` method of the `BigNumber` constructor. + +The other arithmetic operations always give the exact result. + +```javascript +BigNumber.config({ DECIMAL_PLACES: 10, ROUNDING_MODE: 4 }) + +x = new BigNumber(2); +y = new BigNumber(3); +z = x.div(y) // "0.6666666667" +z.sqrt() // "0.8164965809" +z.pow(-3) // "3.3749999995" +z.toString(2) // "0.1010101011" +z.times(z) // "0.44444444448888888889" +z.times(z).round(10) // "0.4444444445" +``` + +There is a `toFraction` method with an optional *maximum denominator* argument + +```javascript +y = new BigNumber(355) +pi = y.dividedBy(113) // "3.1415929204" +pi.toFraction() // [ "7853982301", "2500000000" ] +pi.toFraction(1000) // [ "355", "113" ] +``` + +and `isNaN` and `isFinite` methods, as `NaN` and `Infinity` are valid `BigNumber` values. + +```javascript +x = new BigNumber(NaN) // "NaN" +y = new BigNumber(Infinity) // "Infinity" +x.isNaN() && !y.isNaN() && !x.isFinite() && !y.isFinite() // true +``` + +The value of a BigNumber is stored in a decimal floating point format in terms of a coefficient, exponent and sign. + + +```javascript +x = new BigNumber(-123.456); +x.c // [ 123, 45600000000000 ] coefficient (i.e. significand) +x.e // 2 exponent +x.s // -1 sign +``` + + +Multiple BigNumber constructors can be created, each with their own independent configuration which applies to all BigNumber's created from it. + +```javascript +// Set DECIMAL_PLACES for the original BigNumber constructor +BigNumber.config({ DECIMAL_PLACES: 10 }) + +// Create another BigNumber constructor, optionally passing in a configuration object +BN = BigNumber.another({ DECIMAL_PLACES: 5 }) + +x = new BigNumber(1) +y = new BN(1) + +x.div(3) // '0.3333333333' +y.div(3) // '0.33333' +``` + +For futher information see the [API](http://mikemcl.github.io/bignumber.js/) reference in the *doc* directory. + +## Test + +The *test* directory contains the test scripts for each method. + +The tests can be run with Node or a browser. For Node use + + $ npm test + +or + + $ node test/every-test + +To test a single method, e.g. + + $ node test/toFraction + +For the browser, see *every-test.html* and *single-test.html* in the *test/browser* directory. + +*bignumber-vs-number.html* enables some of the methods of bignumber.js to be compared with those of JavaScript's number type. + +## Versions + +Version 1.x.x of this library is still supported on the 'original' branch. The advantages of later versions are that they are considerably faster for numbers with many digits and that there are some added methods (see Change Log below). The disadvantages are more lines of code and increased code complexity, and the loss of simplicity in no longer having the coefficient of a BigNumber stored in base 10. + +## Performance + +See the [README](https://github.com/MikeMcl/bignumber.js/tree/master/perf) in the *perf* directory. + +## Build + +For Node, if [uglify-js](https://github.com/mishoo/UglifyJS2) is installed + + npm install uglify-js -g + +then + + npm run build + +will create *bignumber.min.js*. + +A source map will also be created in the root directory. + +## Feedback + +Open an issue, or email + +Michael + +M8ch88l@gmail.com + +## Licence + +MIT. + +See [LICENCE](https://github.com/MikeMcl/bignumber.js/blob/master/LICENCE). + +## Change Log + +#### 3.1.2 +* 08/01/2017 +* Minor documentation edit. + +#### 3.1.1 +* 08/01/2017 +* Uncomment `isBigNumber` tests. +* Ignore dot files. + +#### 3.1.0 +* 08/01/2017 +* Add `isBigNumber` method. + +#### 3.0.2 +* 08/01/2017 +* Bugfix: Possible incorrect value of `ERRORS` after a `BigNumber.another` call (due to `parseNumeric` declaration in outer scope). + +#### 3.0.1 +* 23/11/2016 +* Apply fix for old ipads with `%` issue, see #57 and #102. +* Correct error message. + +#### 3.0.0 +* 09/11/2016 +* Remove `require('crypto')` - leave it to the user. +* Add `BigNumber.set` as `BigNumber.config` alias. +* Default `POW_PRECISION` to `0`. + +#### 2.4.0 +* 14/07/2016 +* #97 Add exports to support ES6 imports. + +#### 2.3.0 +* 07/03/2016 +* #86 Add modulus parameter to `toPower`. + +#### 2.2.0 +* 03/03/2016 +* #91 Permit larger JS integers. + +#### 2.1.4 +* 15/12/2015 +* Correct UMD. + +#### 2.1.3 +* 13/12/2015 +* Refactor re global object and crypto availability when bundling. + +#### 2.1.2 +* 10/12/2015 +* Bugfix: `window.crypto` not assigned to `crypto`. + +#### 2.1.1 +* 09/12/2015 +* Prevent code bundler from adding `crypto` shim. + +#### 2.1.0 +* 26/10/2015 +* For `valueOf` and `toJSON`, include the minus sign with negative zero. + +#### 2.0.8 +* 2/10/2015 +* Internal round function bugfix. + +#### 2.0.6 +* 31/03/2015 +* Add bower.json. Tweak division after in-depth review. + +#### 2.0.5 +* 25/03/2015 +* Amend README. Remove bitcoin address. + +#### 2.0.4 +* 25/03/2015 +* Critical bugfix #58: division. + +#### 2.0.3 +* 18/02/2015 +* Amend README. Add source map. + +#### 2.0.2 +* 18/02/2015 +* Correct links. + +#### 2.0.1 +* 18/02/2015 +* Add `max`, `min`, `precision`, `random`, `shift`, `toDigits` and `truncated` methods. +* Add the short-forms: `add`, `mul`, `sd`, `sub` and `trunc`. +* Add an `another` method to enable multiple independent constructors to be created. +* Add support for the base 2, 8 and 16 prefixes `0b`, `0o` and `0x`. +* Enable a rounding mode to be specified as a second parameter to `toExponential`, `toFixed`, `toFormat` and `toPrecision`. +* Add a `CRYPTO` configuration property so cryptographically-secure pseudo-random number generation can be specified. +* Add a `MODULO_MODE` configuration property to enable the rounding mode used by the `modulo` operation to be specified. +* Add a `POW_PRECISION` configuration property to enable the number of significant digits calculated by the power operation to be limited. +* Improve code quality. +* Improve documentation. + +#### 2.0.0 +* 29/12/2014 +* Add `dividedToIntegerBy`, `isInteger` and `toFormat` methods. +* Remove the following short-forms: `isF`, `isZ`, `toE`, `toF`, `toFr`, `toN`, `toP`, `toS`. +* Store a BigNumber's coefficient in base 1e14, rather than base 10. +* Add fast path for integers to BigNumber constructor. +* Incorporate the library into the online documentation. + +#### 1.5.0 +* 13/11/2014 +* Add `toJSON` and `decimalPlaces` methods. + +#### 1.4.1 +* 08/06/2014 +* Amend README. + +#### 1.4.0 +* 08/05/2014 +* Add `toNumber`. + +#### 1.3.0 +* 08/11/2013 +* Ensure correct rounding of `sqrt` in all, rather than almost all, cases. +* Maximum radix to 64. + +#### 1.2.1 +* 17/10/2013 +* Sign of zero when x < 0 and x + (-x) = 0. + +#### 1.2.0 +* 19/9/2013 +* Throw Error objects for stack. + +#### 1.1.1 +* 22/8/2013 +* Show original value in constructor error message. + +#### 1.1.0 +* 1/8/2013 +* Allow numbers with trailing radix point. + +#### 1.0.1 +* Bugfix: error messages with incorrect method name + +#### 1.0.0 +* 8/11/2012 +* Initial release diff --git a/Server File/node_modules/bignumber.js/bignumber.js b/Server File/node_modules/bignumber.js/bignumber.js new file mode 100644 index 0000000..2b90b3a --- /dev/null +++ b/Server File/node_modules/bignumber.js/bignumber.js @@ -0,0 +1,2745 @@ +/*! bignumber.js v3.1.2 https://github.com/MikeMcl/bignumber.js/LICENCE */ + +;(function (globalObj) { + 'use strict'; + + /* + bignumber.js v3.1.2 + A JavaScript library for arbitrary-precision arithmetic. + https://github.com/MikeMcl/bignumber.js + Copyright (c) 2016 Michael Mclaughlin + MIT Expat Licence + */ + + + var BigNumber, + isNumeric = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, + mathceil = Math.ceil, + mathfloor = Math.floor, + notBool = ' not a boolean or binary digit', + roundingMode = 'rounding mode', + tooManyDigits = 'number type has more than 15 significant digits', + ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_', + BASE = 1e14, + LOG_BASE = 14, + MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1 + // MAX_INT32 = 0x7fffffff, // 2^31 - 1 + POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], + SQRT_BASE = 1e7, + + /* + * The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and + * the arguments to toExponential, toFixed, toFormat, and toPrecision, beyond which an + * exception is thrown (if ERRORS is true). + */ + MAX = 1E9; // 0 to MAX_INT32 + + + /* + * Create and return a BigNumber constructor. + */ + function constructorFactory(configObj) { + var div, parseNumeric, + + // id tracks the caller function, so its name can be included in error messages. + id = 0, + P = BigNumber.prototype, + ONE = new BigNumber(1), + + + /********************************* EDITABLE DEFAULTS **********************************/ + + + /* + * The default values below must be integers within the inclusive ranges stated. + * The values can also be changed at run-time using BigNumber.config. + */ + + // The maximum number of decimal places for operations involving division. + DECIMAL_PLACES = 20, // 0 to MAX + + /* + * The rounding mode used when rounding to the above decimal places, and when using + * toExponential, toFixed, toFormat and toPrecision, and round (default value). + * UP 0 Away from zero. + * DOWN 1 Towards zero. + * CEIL 2 Towards +Infinity. + * FLOOR 3 Towards -Infinity. + * HALF_UP 4 Towards nearest neighbour. If equidistant, up. + * HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. + * HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. + * HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. + * HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. + */ + ROUNDING_MODE = 4, // 0 to 8 + + // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS] + + // The exponent value at and beneath which toString returns exponential notation. + // Number type: -7 + TO_EXP_NEG = -7, // 0 to -MAX + + // The exponent value at and above which toString returns exponential notation. + // Number type: 21 + TO_EXP_POS = 21, // 0 to MAX + + // RANGE : [MIN_EXP, MAX_EXP] + + // The minimum exponent value, beneath which underflow to zero occurs. + // Number type: -324 (5e-324) + MIN_EXP = -1e7, // -1 to -MAX + + // The maximum exponent value, above which overflow to Infinity occurs. + // Number type: 308 (1.7976931348623157e+308) + // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow. + MAX_EXP = 1e7, // 1 to MAX + + // Whether BigNumber Errors are ever thrown. + ERRORS = true, // true or false + + // Change to intValidatorNoErrors if ERRORS is false. + isValidInt = intValidatorWithErrors, // intValidatorWithErrors/intValidatorNoErrors + + // Whether to use cryptographically-secure random number generation, if available. + CRYPTO = false, // true or false + + /* + * The modulo mode used when calculating the modulus: a mod n. + * The quotient (q = a / n) is calculated according to the corresponding rounding mode. + * The remainder (r) is calculated as: r = a - n * q. + * + * UP 0 The remainder is positive if the dividend is negative, else is negative. + * DOWN 1 The remainder has the same sign as the dividend. + * This modulo mode is commonly known as 'truncated division' and is + * equivalent to (a % n) in JavaScript. + * FLOOR 3 The remainder has the same sign as the divisor (Python %). + * HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function. + * EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). + * The remainder is always positive. + * + * The truncated division, floored division, Euclidian division and IEEE 754 remainder + * modes are commonly used for the modulus operation. + * Although the other rounding modes can also be used, they may not give useful results. + */ + MODULO_MODE = 1, // 0 to 9 + + // The maximum number of significant digits of the result of the toPower operation. + // If POW_PRECISION is 0, there will be unlimited significant digits. + POW_PRECISION = 0, // 0 to MAX + + // The format specification used by the BigNumber.prototype.toFormat method. + FORMAT = { + decimalSeparator: '.', + groupSeparator: ',', + groupSize: 3, + secondaryGroupSize: 0, + fractionGroupSeparator: '\xA0', // non-breaking space + fractionGroupSize: 0 + }; + + + /******************************************************************************************/ + + + // CONSTRUCTOR + + + /* + * The BigNumber constructor and exported function. + * Create and return a new instance of a BigNumber object. + * + * n {number|string|BigNumber} A numeric value. + * [b] {number} The base of n. Integer, 2 to 64 inclusive. + */ + function BigNumber( n, b ) { + var c, e, i, num, len, str, + x = this; + + // Enable constructor usage without new. + if ( !( x instanceof BigNumber ) ) { + + // 'BigNumber() constructor call without new: {n}' + if (ERRORS) raise( 26, 'constructor call without new', n ); + return new BigNumber( n, b ); + } + + // 'new BigNumber() base not an integer: {b}' + // 'new BigNumber() base out of range: {b}' + if ( b == null || !isValidInt( b, 2, 64, id, 'base' ) ) { + + // Duplicate. + if ( n instanceof BigNumber ) { + x.s = n.s; + x.e = n.e; + x.c = ( n = n.c ) ? n.slice() : n; + id = 0; + return; + } + + if ( ( num = typeof n == 'number' ) && n * 0 == 0 ) { + x.s = 1 / n < 0 ? ( n = -n, -1 ) : 1; + + // Fast path for integers. + if ( n === ~~n ) { + for ( e = 0, i = n; i >= 10; i /= 10, e++ ); + x.e = e; + x.c = [n]; + id = 0; + return; + } + + str = n + ''; + } else { + if ( !isNumeric.test( str = n + '' ) ) return parseNumeric( x, str, num ); + x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1; + } + } else { + b = b | 0; + str = n + ''; + + // Ensure return value is rounded to DECIMAL_PLACES as with other bases. + // Allow exponential notation to be used with base 10 argument. + if ( b == 10 ) { + x = new BigNumber( n instanceof BigNumber ? n : str ); + return round( x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE ); + } + + // Avoid potential interpretation of Infinity and NaN as base 44+ values. + // Any number in exponential form will fail due to the [Ee][+-]. + if ( ( num = typeof n == 'number' ) && n * 0 != 0 || + !( new RegExp( '^-?' + ( c = '[' + ALPHABET.slice( 0, b ) + ']+' ) + + '(?:\\.' + c + ')?$',b < 37 ? 'i' : '' ) ).test(str) ) { + return parseNumeric( x, str, num, b ); + } + + if (num) { + x.s = 1 / n < 0 ? ( str = str.slice(1), -1 ) : 1; + + if ( ERRORS && str.replace( /^0\.0*|\./, '' ).length > 15 ) { + + // 'new BigNumber() number type has more than 15 significant digits: {n}' + raise( id, tooManyDigits, n ); + } + + // Prevent later check for length on converted number. + num = false; + } else { + x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1; + } + + str = convertBase( str, 10, b, x.s ); + } + + // Decimal point? + if ( ( e = str.indexOf('.') ) > -1 ) str = str.replace( '.', '' ); + + // Exponential form? + if ( ( i = str.search( /e/i ) ) > 0 ) { + + // Determine exponent. + if ( e < 0 ) e = i; + e += +str.slice( i + 1 ); + str = str.substring( 0, i ); + } else if ( e < 0 ) { + + // Integer. + e = str.length; + } + + // Determine leading zeros. + for ( i = 0; str.charCodeAt(i) === 48; i++ ); + + // Determine trailing zeros. + for ( len = str.length; str.charCodeAt(--len) === 48; ); + str = str.slice( i, len + 1 ); + + if (str) { + len = str.length; + + // Disallow numbers with over 15 significant digits if number type. + // 'new BigNumber() number type has more than 15 significant digits: {n}' + if ( num && ERRORS && len > 15 && ( n > MAX_SAFE_INTEGER || n !== mathfloor(n) ) ) { + raise( id, tooManyDigits, x.s * n ); + } + + e = e - i - 1; + + // Overflow? + if ( e > MAX_EXP ) { + + // Infinity. + x.c = x.e = null; + + // Underflow? + } else if ( e < MIN_EXP ) { + + // Zero. + x.c = [ x.e = 0 ]; + } else { + x.e = e; + x.c = []; + + // Transform base + + // e is the base 10 exponent. + // i is where to slice str to get the first element of the coefficient array. + i = ( e + 1 ) % LOG_BASE; + if ( e < 0 ) i += LOG_BASE; + + if ( i < len ) { + if (i) x.c.push( +str.slice( 0, i ) ); + + for ( len -= LOG_BASE; i < len; ) { + x.c.push( +str.slice( i, i += LOG_BASE ) ); + } + + str = str.slice(i); + i = LOG_BASE - str.length; + } else { + i -= len; + } + + for ( ; i--; str += '0' ); + x.c.push( +str ); + } + } else { + + // Zero. + x.c = [ x.e = 0 ]; + } + + id = 0; + } + + + // CONSTRUCTOR PROPERTIES + + + BigNumber.another = constructorFactory; + + BigNumber.ROUND_UP = 0; + BigNumber.ROUND_DOWN = 1; + BigNumber.ROUND_CEIL = 2; + BigNumber.ROUND_FLOOR = 3; + BigNumber.ROUND_HALF_UP = 4; + BigNumber.ROUND_HALF_DOWN = 5; + BigNumber.ROUND_HALF_EVEN = 6; + BigNumber.ROUND_HALF_CEIL = 7; + BigNumber.ROUND_HALF_FLOOR = 8; + BigNumber.EUCLID = 9; + + + /* + * Configure infrequently-changing library-wide settings. + * + * Accept an object or an argument list, with one or many of the following properties or + * parameters respectively: + * + * DECIMAL_PLACES {number} Integer, 0 to MAX inclusive + * ROUNDING_MODE {number} Integer, 0 to 8 inclusive + * EXPONENTIAL_AT {number|number[]} Integer, -MAX to MAX inclusive or + * [integer -MAX to 0 incl., 0 to MAX incl.] + * RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or + * [integer -MAX to -1 incl., integer 1 to MAX incl.] + * ERRORS {boolean|number} true, false, 1 or 0 + * CRYPTO {boolean|number} true, false, 1 or 0 + * MODULO_MODE {number} 0 to 9 inclusive + * POW_PRECISION {number} 0 to MAX inclusive + * FORMAT {object} See BigNumber.prototype.toFormat + * decimalSeparator {string} + * groupSeparator {string} + * groupSize {number} + * secondaryGroupSize {number} + * fractionGroupSeparator {string} + * fractionGroupSize {number} + * + * (The values assigned to the above FORMAT object properties are not checked for validity.) + * + * E.g. + * BigNumber.config(20, 4) is equivalent to + * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) + * + * Ignore properties/parameters set to null or undefined. + * Return an object with the properties current values. + */ + BigNumber.config = BigNumber.set = function () { + var v, p, + i = 0, + r = {}, + a = arguments, + o = a[0], + has = o && typeof o == 'object' + ? function () { if ( o.hasOwnProperty(p) ) return ( v = o[p] ) != null; } + : function () { if ( a.length > i ) return ( v = a[i++] ) != null; }; + + // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive. + // 'config() DECIMAL_PLACES not an integer: {v}' + // 'config() DECIMAL_PLACES out of range: {v}' + if ( has( p = 'DECIMAL_PLACES' ) && isValidInt( v, 0, MAX, 2, p ) ) { + DECIMAL_PLACES = v | 0; + } + r[p] = DECIMAL_PLACES; + + // ROUNDING_MODE {number} Integer, 0 to 8 inclusive. + // 'config() ROUNDING_MODE not an integer: {v}' + // 'config() ROUNDING_MODE out of range: {v}' + if ( has( p = 'ROUNDING_MODE' ) && isValidInt( v, 0, 8, 2, p ) ) { + ROUNDING_MODE = v | 0; + } + r[p] = ROUNDING_MODE; + + // EXPONENTIAL_AT {number|number[]} + // Integer, -MAX to MAX inclusive or [integer -MAX to 0 inclusive, 0 to MAX inclusive]. + // 'config() EXPONENTIAL_AT not an integer: {v}' + // 'config() EXPONENTIAL_AT out of range: {v}' + if ( has( p = 'EXPONENTIAL_AT' ) ) { + + if ( isArray(v) ) { + if ( isValidInt( v[0], -MAX, 0, 2, p ) && isValidInt( v[1], 0, MAX, 2, p ) ) { + TO_EXP_NEG = v[0] | 0; + TO_EXP_POS = v[1] | 0; + } + } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) { + TO_EXP_NEG = -( TO_EXP_POS = ( v < 0 ? -v : v ) | 0 ); + } + } + r[p] = [ TO_EXP_NEG, TO_EXP_POS ]; + + // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or + // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive]. + // 'config() RANGE not an integer: {v}' + // 'config() RANGE cannot be zero: {v}' + // 'config() RANGE out of range: {v}' + if ( has( p = 'RANGE' ) ) { + + if ( isArray(v) ) { + if ( isValidInt( v[0], -MAX, -1, 2, p ) && isValidInt( v[1], 1, MAX, 2, p ) ) { + MIN_EXP = v[0] | 0; + MAX_EXP = v[1] | 0; + } + } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) { + if ( v | 0 ) MIN_EXP = -( MAX_EXP = ( v < 0 ? -v : v ) | 0 ); + else if (ERRORS) raise( 2, p + ' cannot be zero', v ); + } + } + r[p] = [ MIN_EXP, MAX_EXP ]; + + // ERRORS {boolean|number} true, false, 1 or 0. + // 'config() ERRORS not a boolean or binary digit: {v}' + if ( has( p = 'ERRORS' ) ) { + + if ( v === !!v || v === 1 || v === 0 ) { + id = 0; + isValidInt = ( ERRORS = !!v ) ? intValidatorWithErrors : intValidatorNoErrors; + } else if (ERRORS) { + raise( 2, p + notBool, v ); + } + } + r[p] = ERRORS; + + // CRYPTO {boolean|number} true, false, 1 or 0. + // 'config() CRYPTO not a boolean or binary digit: {v}' + // 'config() crypto unavailable: {crypto}' + if ( has( p = 'CRYPTO' ) ) { + + if ( v === true || v === false || v === 1 || v === 0 ) { + if (v) { + v = typeof crypto == 'undefined'; + if ( !v && crypto && (crypto.getRandomValues || crypto.randomBytes)) { + CRYPTO = true; + } else if (ERRORS) { + raise( 2, 'crypto unavailable', v ? void 0 : crypto ); + } else { + CRYPTO = false; + } + } else { + CRYPTO = false; + } + } else if (ERRORS) { + raise( 2, p + notBool, v ); + } + } + r[p] = CRYPTO; + + // MODULO_MODE {number} Integer, 0 to 9 inclusive. + // 'config() MODULO_MODE not an integer: {v}' + // 'config() MODULO_MODE out of range: {v}' + if ( has( p = 'MODULO_MODE' ) && isValidInt( v, 0, 9, 2, p ) ) { + MODULO_MODE = v | 0; + } + r[p] = MODULO_MODE; + + // POW_PRECISION {number} Integer, 0 to MAX inclusive. + // 'config() POW_PRECISION not an integer: {v}' + // 'config() POW_PRECISION out of range: {v}' + if ( has( p = 'POW_PRECISION' ) && isValidInt( v, 0, MAX, 2, p ) ) { + POW_PRECISION = v | 0; + } + r[p] = POW_PRECISION; + + // FORMAT {object} + // 'config() FORMAT not an object: {v}' + if ( has( p = 'FORMAT' ) ) { + + if ( typeof v == 'object' ) { + FORMAT = v; + } else if (ERRORS) { + raise( 2, p + ' not an object', v ); + } + } + r[p] = FORMAT; + + return r; + }; + + + /* + * Return true if value v is a BigNumber instance, otherwise return false. + * + * v {any} A value that may or may not be a BigNumber instance. + */ + BigNumber.isBigNumber = isBigNumber; + + + /* + * Return a new BigNumber whose value is the maximum of the arguments. + * + * arguments {number|string|BigNumber} + */ + BigNumber.max = function () { return maxOrMin( arguments, P.lt ); }; + + + /* + * Return a new BigNumber whose value is the minimum of the arguments. + * + * arguments {number|string|BigNumber} + */ + BigNumber.min = function () { return maxOrMin( arguments, P.gt ); }; + + + /* + * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, + * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing + * zeros are produced). + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * + * 'random() decimal places not an integer: {dp}' + * 'random() decimal places out of range: {dp}' + * 'random() crypto unavailable: {crypto}' + */ + BigNumber.random = (function () { + var pow2_53 = 0x20000000000000; + + // Return a 53 bit integer n, where 0 <= n < 9007199254740992. + // Check if Math.random() produces more than 32 bits of randomness. + // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits. + // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1. + var random53bitInt = (Math.random() * pow2_53) & 0x1fffff + ? function () { return mathfloor( Math.random() * pow2_53 ); } + : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) + + (Math.random() * 0x800000 | 0); }; + + return function (dp) { + var a, b, e, k, v, + i = 0, + c = [], + rand = new BigNumber(ONE); + + dp = dp == null || !isValidInt( dp, 0, MAX, 14 ) ? DECIMAL_PLACES : dp | 0; + k = mathceil( dp / LOG_BASE ); + + if (CRYPTO) { + + // Browsers supporting crypto.getRandomValues. + if (crypto.getRandomValues) { + + a = crypto.getRandomValues( new Uint32Array( k *= 2 ) ); + + for ( ; i < k; ) { + + // 53 bits: + // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2) + // 11111 11111111 11111111 11111111 11100000 00000000 00000000 + // ((Math.pow(2, 32) - 1) >>> 11).toString(2) + // 11111 11111111 11111111 + // 0x20000 is 2^21. + v = a[i] * 0x20000 + (a[i + 1] >>> 11); + + // Rejection sampling: + // 0 <= v < 9007199254740992 + // Probability that v >= 9e15, is + // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251 + if ( v >= 9e15 ) { + b = crypto.getRandomValues( new Uint32Array(2) ); + a[i] = b[0]; + a[i + 1] = b[1]; + } else { + + // 0 <= v <= 8999999999999999 + // 0 <= (v % 1e14) <= 99999999999999 + c.push( v % 1e14 ); + i += 2; + } + } + i = k / 2; + + // Node.js supporting crypto.randomBytes. + } else if (crypto.randomBytes) { + + // buffer + a = crypto.randomBytes( k *= 7 ); + + for ( ; i < k; ) { + + // 0x1000000000000 is 2^48, 0x10000000000 is 2^40 + // 0x100000000 is 2^32, 0x1000000 is 2^24 + // 11111 11111111 11111111 11111111 11111111 11111111 11111111 + // 0 <= v < 9007199254740992 + v = ( ( a[i] & 31 ) * 0x1000000000000 ) + ( a[i + 1] * 0x10000000000 ) + + ( a[i + 2] * 0x100000000 ) + ( a[i + 3] * 0x1000000 ) + + ( a[i + 4] << 16 ) + ( a[i + 5] << 8 ) + a[i + 6]; + + if ( v >= 9e15 ) { + crypto.randomBytes(7).copy( a, i ); + } else { + + // 0 <= (v % 1e14) <= 99999999999999 + c.push( v % 1e14 ); + i += 7; + } + } + i = k / 7; + } else { + CRYPTO = false; + if (ERRORS) raise( 14, 'crypto unavailable', crypto ); + } + } + + // Use Math.random. + if (!CRYPTO) { + + for ( ; i < k; ) { + v = random53bitInt(); + if ( v < 9e15 ) c[i++] = v % 1e14; + } + } + + k = c[--i]; + dp %= LOG_BASE; + + // Convert trailing digits to zeros according to dp. + if ( k && dp ) { + v = POWS_TEN[LOG_BASE - dp]; + c[i] = mathfloor( k / v ) * v; + } + + // Remove trailing elements which are zero. + for ( ; c[i] === 0; c.pop(), i-- ); + + // Zero? + if ( i < 0 ) { + c = [ e = 0 ]; + } else { + + // Remove leading elements which are zero and adjust exponent accordingly. + for ( e = -1 ; c[0] === 0; c.shift(), e -= LOG_BASE); + + // Count the digits of the first element of c to determine leading zeros, and... + for ( i = 1, v = c[0]; v >= 10; v /= 10, i++); + + // adjust the exponent accordingly. + if ( i < LOG_BASE ) e -= LOG_BASE - i; + } + + rand.e = e; + rand.c = c; + return rand; + }; + })(); + + + // PRIVATE FUNCTIONS + + + // Convert a numeric string of baseIn to a numeric string of baseOut. + function convertBase( str, baseOut, baseIn, sign ) { + var d, e, k, r, x, xc, y, + i = str.indexOf( '.' ), + dp = DECIMAL_PLACES, + rm = ROUNDING_MODE; + + if ( baseIn < 37 ) str = str.toLowerCase(); + + // Non-integer. + if ( i >= 0 ) { + k = POW_PRECISION; + + // Unlimited precision. + POW_PRECISION = 0; + str = str.replace( '.', '' ); + y = new BigNumber(baseIn); + x = y.pow( str.length - i ); + POW_PRECISION = k; + + // Convert str as if an integer, then restore the fraction part by dividing the + // result by its base raised to a power. + y.c = toBaseOut( toFixedPoint( coeffToString( x.c ), x.e ), 10, baseOut ); + y.e = y.c.length; + } + + // Convert the number as integer. + xc = toBaseOut( str, baseIn, baseOut ); + e = k = xc.length; + + // Remove trailing zeros. + for ( ; xc[--k] == 0; xc.pop() ); + if ( !xc[0] ) return '0'; + + if ( i < 0 ) { + --e; + } else { + x.c = xc; + x.e = e; + + // sign is needed for correct rounding. + x.s = sign; + x = div( x, y, dp, rm, baseOut ); + xc = x.c; + r = x.r; + e = x.e; + } + + d = e + dp + 1; + + // The rounding digit, i.e. the digit to the right of the digit that may be rounded up. + i = xc[d]; + k = baseOut / 2; + r = r || d < 0 || xc[d + 1] != null; + + r = rm < 4 ? ( i != null || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) ) + : i > k || i == k &&( rm == 4 || r || rm == 6 && xc[d - 1] & 1 || + rm == ( x.s < 0 ? 8 : 7 ) ); + + if ( d < 1 || !xc[0] ) { + + // 1^-dp or 0. + str = r ? toFixedPoint( '1', -dp ) : '0'; + } else { + xc.length = d; + + if (r) { + + // Rounding up may mean the previous digit has to be rounded up and so on. + for ( --baseOut; ++xc[--d] > baseOut; ) { + xc[d] = 0; + + if ( !d ) { + ++e; + xc.unshift(1); + } + } + } + + // Determine trailing zeros. + for ( k = xc.length; !xc[--k]; ); + + // E.g. [4, 11, 15] becomes 4bf. + for ( i = 0, str = ''; i <= k; str += ALPHABET.charAt( xc[i++] ) ); + str = toFixedPoint( str, e ); + } + + // The caller will add the sign. + return str; + } + + + // Perform division in the specified base. Called by div and convertBase. + div = (function () { + + // Assume non-zero x and k. + function multiply( x, k, base ) { + var m, temp, xlo, xhi, + carry = 0, + i = x.length, + klo = k % SQRT_BASE, + khi = k / SQRT_BASE | 0; + + for ( x = x.slice(); i--; ) { + xlo = x[i] % SQRT_BASE; + xhi = x[i] / SQRT_BASE | 0; + m = khi * xlo + xhi * klo; + temp = klo * xlo + ( ( m % SQRT_BASE ) * SQRT_BASE ) + carry; + carry = ( temp / base | 0 ) + ( m / SQRT_BASE | 0 ) + khi * xhi; + x[i] = temp % base; + } + + if (carry) x.unshift(carry); + + return x; + } + + function compare( a, b, aL, bL ) { + var i, cmp; + + if ( aL != bL ) { + cmp = aL > bL ? 1 : -1; + } else { + + for ( i = cmp = 0; i < aL; i++ ) { + + if ( a[i] != b[i] ) { + cmp = a[i] > b[i] ? 1 : -1; + break; + } + } + } + return cmp; + } + + function subtract( a, b, aL, base ) { + var i = 0; + + // Subtract b from a. + for ( ; aL--; ) { + a[aL] -= i; + i = a[aL] < b[aL] ? 1 : 0; + a[aL] = i * base + a[aL] - b[aL]; + } + + // Remove leading zeros. + for ( ; !a[0] && a.length > 1; a.shift() ); + } + + // x: dividend, y: divisor. + return function ( x, y, dp, rm, base ) { + var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, + yL, yz, + s = x.s == y.s ? 1 : -1, + xc = x.c, + yc = y.c; + + // Either NaN, Infinity or 0? + if ( !xc || !xc[0] || !yc || !yc[0] ) { + + return new BigNumber( + + // Return NaN if either NaN, or both Infinity or 0. + !x.s || !y.s || ( xc ? yc && xc[0] == yc[0] : !yc ) ? NaN : + + // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0. + xc && xc[0] == 0 || !yc ? s * 0 : s / 0 + ); + } + + q = new BigNumber(s); + qc = q.c = []; + e = x.e - y.e; + s = dp + e + 1; + + if ( !base ) { + base = BASE; + e = bitFloor( x.e / LOG_BASE ) - bitFloor( y.e / LOG_BASE ); + s = s / LOG_BASE | 0; + } + + // Result exponent may be one less then the current value of e. + // The coefficients of the BigNumbers from convertBase may have trailing zeros. + for ( i = 0; yc[i] == ( xc[i] || 0 ); i++ ); + if ( yc[i] > ( xc[i] || 0 ) ) e--; + + if ( s < 0 ) { + qc.push(1); + more = true; + } else { + xL = xc.length; + yL = yc.length; + i = 0; + s += 2; + + // Normalise xc and yc so highest order digit of yc is >= base / 2. + + n = mathfloor( base / ( yc[0] + 1 ) ); + + // Not necessary, but to handle odd bases where yc[0] == ( base / 2 ) - 1. + // if ( n > 1 || n++ == 1 && yc[0] < base / 2 ) { + if ( n > 1 ) { + yc = multiply( yc, n, base ); + xc = multiply( xc, n, base ); + yL = yc.length; + xL = xc.length; + } + + xi = yL; + rem = xc.slice( 0, yL ); + remL = rem.length; + + // Add zeros to make remainder as long as divisor. + for ( ; remL < yL; rem[remL++] = 0 ); + yz = yc.slice(); + yz.unshift(0); + yc0 = yc[0]; + if ( yc[1] >= base / 2 ) yc0++; + // Not necessary, but to prevent trial digit n > base, when using base 3. + // else if ( base == 3 && yc0 == 1 ) yc0 = 1 + 1e-15; + + do { + n = 0; + + // Compare divisor and remainder. + cmp = compare( yc, rem, yL, remL ); + + // If divisor < remainder. + if ( cmp < 0 ) { + + // Calculate trial digit, n. + + rem0 = rem[0]; + if ( yL != remL ) rem0 = rem0 * base + ( rem[1] || 0 ); + + // n is how many times the divisor goes into the current remainder. + n = mathfloor( rem0 / yc0 ); + + // Algorithm: + // 1. product = divisor * trial digit (n) + // 2. if product > remainder: product -= divisor, n-- + // 3. remainder -= product + // 4. if product was < remainder at 2: + // 5. compare new remainder and divisor + // 6. If remainder > divisor: remainder -= divisor, n++ + + if ( n > 1 ) { + + // n may be > base only when base is 3. + if (n >= base) n = base - 1; + + // product = divisor * trial digit. + prod = multiply( yc, n, base ); + prodL = prod.length; + remL = rem.length; + + // Compare product and remainder. + // If product > remainder. + // Trial digit n too high. + // n is 1 too high about 5% of the time, and is not known to have + // ever been more than 1 too high. + while ( compare( prod, rem, prodL, remL ) == 1 ) { + n--; + + // Subtract divisor from product. + subtract( prod, yL < prodL ? yz : yc, prodL, base ); + prodL = prod.length; + cmp = 1; + } + } else { + + // n is 0 or 1, cmp is -1. + // If n is 0, there is no need to compare yc and rem again below, + // so change cmp to 1 to avoid it. + // If n is 1, leave cmp as -1, so yc and rem are compared again. + if ( n == 0 ) { + + // divisor < remainder, so n must be at least 1. + cmp = n = 1; + } + + // product = divisor + prod = yc.slice(); + prodL = prod.length; + } + + if ( prodL < remL ) prod.unshift(0); + + // Subtract product from remainder. + subtract( rem, prod, remL, base ); + remL = rem.length; + + // If product was < remainder. + if ( cmp == -1 ) { + + // Compare divisor and new remainder. + // If divisor < new remainder, subtract divisor from remainder. + // Trial digit n too low. + // n is 1 too low about 5% of the time, and very rarely 2 too low. + while ( compare( yc, rem, yL, remL ) < 1 ) { + n++; + + // Subtract divisor from remainder. + subtract( rem, yL < remL ? yz : yc, remL, base ); + remL = rem.length; + } + } + } else if ( cmp === 0 ) { + n++; + rem = [0]; + } // else cmp === 1 and n will be 0 + + // Add the next digit, n, to the result array. + qc[i++] = n; + + // Update the remainder. + if ( rem[0] ) { + rem[remL++] = xc[xi] || 0; + } else { + rem = [ xc[xi] ]; + remL = 1; + } + } while ( ( xi++ < xL || rem[0] != null ) && s-- ); + + more = rem[0] != null; + + // Leading zero? + if ( !qc[0] ) qc.shift(); + } + + if ( base == BASE ) { + + // To calculate q.e, first get the number of digits of qc[0]. + for ( i = 1, s = qc[0]; s >= 10; s /= 10, i++ ); + round( q, dp + ( q.e = i + e * LOG_BASE - 1 ) + 1, rm, more ); + + // Caller is convertBase. + } else { + q.e = e; + q.r = +more; + } + + return q; + }; + })(); + + + /* + * Return a string representing the value of BigNumber n in fixed-point or exponential + * notation rounded to the specified decimal places or significant digits. + * + * n is a BigNumber. + * i is the index of the last digit required (i.e. the digit that may be rounded up). + * rm is the rounding mode. + * caller is caller id: toExponential 19, toFixed 20, toFormat 21, toPrecision 24. + */ + function format( n, i, rm, caller ) { + var c0, e, ne, len, str; + + rm = rm != null && isValidInt( rm, 0, 8, caller, roundingMode ) + ? rm | 0 : ROUNDING_MODE; + + if ( !n.c ) return n.toString(); + c0 = n.c[0]; + ne = n.e; + + if ( i == null ) { + str = coeffToString( n.c ); + str = caller == 19 || caller == 24 && ne <= TO_EXP_NEG + ? toExponential( str, ne ) + : toFixedPoint( str, ne ); + } else { + n = round( new BigNumber(n), i, rm ); + + // n.e may have changed if the value was rounded up. + e = n.e; + + str = coeffToString( n.c ); + len = str.length; + + // toPrecision returns exponential notation if the number of significant digits + // specified is less than the number of digits necessary to represent the integer + // part of the value in fixed-point notation. + + // Exponential notation. + if ( caller == 19 || caller == 24 && ( i <= e || e <= TO_EXP_NEG ) ) { + + // Append zeros? + for ( ; len < i; str += '0', len++ ); + str = toExponential( str, e ); + + // Fixed-point notation. + } else { + i -= ne; + str = toFixedPoint( str, e ); + + // Append zeros? + if ( e + 1 > len ) { + if ( --i > 0 ) for ( str += '.'; i--; str += '0' ); + } else { + i += e - len; + if ( i > 0 ) { + if ( e + 1 == len ) str += '.'; + for ( ; i--; str += '0' ); + } + } + } + } + + return n.s < 0 && c0 ? '-' + str : str; + } + + + // Handle BigNumber.max and BigNumber.min. + function maxOrMin( args, method ) { + var m, n, + i = 0; + + if ( isArray( args[0] ) ) args = args[0]; + m = new BigNumber( args[0] ); + + for ( ; ++i < args.length; ) { + n = new BigNumber( args[i] ); + + // If any number is NaN, return NaN. + if ( !n.s ) { + m = n; + break; + } else if ( method.call( m, n ) ) { + m = n; + } + } + + return m; + } + + + /* + * Return true if n is an integer in range, otherwise throw. + * Use for argument validation when ERRORS is true. + */ + function intValidatorWithErrors( n, min, max, caller, name ) { + if ( n < min || n > max || n != truncate(n) ) { + raise( caller, ( name || 'decimal places' ) + + ( n < min || n > max ? ' out of range' : ' not an integer' ), n ); + } + + return true; + } + + + /* + * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. + * Called by minus, plus and times. + */ + function normalise( n, c, e ) { + var i = 1, + j = c.length; + + // Remove trailing zeros. + for ( ; !c[--j]; c.pop() ); + + // Calculate the base 10 exponent. First get the number of digits of c[0]. + for ( j = c[0]; j >= 10; j /= 10, i++ ); + + // Overflow? + if ( ( e = i + e * LOG_BASE - 1 ) > MAX_EXP ) { + + // Infinity. + n.c = n.e = null; + + // Underflow? + } else if ( e < MIN_EXP ) { + + // Zero. + n.c = [ n.e = 0 ]; + } else { + n.e = e; + n.c = c; + } + + return n; + } + + + // Handle values that fail the validity test in BigNumber. + parseNumeric = (function () { + var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, + dotAfter = /^([^.]+)\.$/, + dotBefore = /^\.([^.]+)$/, + isInfinityOrNaN = /^-?(Infinity|NaN)$/, + whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g; + + return function ( x, str, num, b ) { + var base, + s = num ? str : str.replace( whitespaceOrPlus, '' ); + + // No exception on ±Infinity or NaN. + if ( isInfinityOrNaN.test(s) ) { + x.s = isNaN(s) ? null : s < 0 ? -1 : 1; + } else { + if ( !num ) { + + // basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i + s = s.replace( basePrefix, function ( m, p1, p2 ) { + base = ( p2 = p2.toLowerCase() ) == 'x' ? 16 : p2 == 'b' ? 2 : 8; + return !b || b == base ? p1 : m; + }); + + if (b) { + base = b; + + // E.g. '1.' to '1', '.1' to '0.1' + s = s.replace( dotAfter, '$1' ).replace( dotBefore, '0.$1' ); + } + + if ( str != s ) return new BigNumber( s, base ); + } + + // 'new BigNumber() not a number: {n}' + // 'new BigNumber() not a base {b} number: {n}' + if (ERRORS) raise( id, 'not a' + ( b ? ' base ' + b : '' ) + ' number', str ); + x.s = null; + } + + x.c = x.e = null; + id = 0; + } + })(); + + + // Throw a BigNumber Error. + function raise( caller, msg, val ) { + var error = new Error( [ + 'new BigNumber', // 0 + 'cmp', // 1 + 'config', // 2 + 'div', // 3 + 'divToInt', // 4 + 'eq', // 5 + 'gt', // 6 + 'gte', // 7 + 'lt', // 8 + 'lte', // 9 + 'minus', // 10 + 'mod', // 11 + 'plus', // 12 + 'precision', // 13 + 'random', // 14 + 'round', // 15 + 'shift', // 16 + 'times', // 17 + 'toDigits', // 18 + 'toExponential', // 19 + 'toFixed', // 20 + 'toFormat', // 21 + 'toFraction', // 22 + 'pow', // 23 + 'toPrecision', // 24 + 'toString', // 25 + 'BigNumber' // 26 + ][caller] + '() ' + msg + ': ' + val ); + + error.name = 'BigNumber Error'; + id = 0; + throw error; + } + + + /* + * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. + * If r is truthy, it is known that there are more digits after the rounding digit. + */ + function round( x, sd, rm, r ) { + var d, i, j, k, n, ni, rd, + xc = x.c, + pows10 = POWS_TEN; + + // if x is not Infinity or NaN... + if (xc) { + + // rd is the rounding digit, i.e. the digit after the digit that may be rounded up. + // n is a base 1e14 number, the value of the element of array x.c containing rd. + // ni is the index of n within x.c. + // d is the number of digits of n. + // i is the index of rd within n including leading zeros. + // j is the actual index of rd within n (if < 0, rd is a leading zero). + out: { + + // Get the number of digits of the first element of xc. + for ( d = 1, k = xc[0]; k >= 10; k /= 10, d++ ); + i = sd - d; + + // If the rounding digit is in the first element of xc... + if ( i < 0 ) { + i += LOG_BASE; + j = sd; + n = xc[ ni = 0 ]; + + // Get the rounding digit at index j of n. + rd = n / pows10[ d - j - 1 ] % 10 | 0; + } else { + ni = mathceil( ( i + 1 ) / LOG_BASE ); + + if ( ni >= xc.length ) { + + if (r) { + + // Needed by sqrt. + for ( ; xc.length <= ni; xc.push(0) ); + n = rd = 0; + d = 1; + i %= LOG_BASE; + j = i - LOG_BASE + 1; + } else { + break out; + } + } else { + n = k = xc[ni]; + + // Get the number of digits of n. + for ( d = 1; k >= 10; k /= 10, d++ ); + + // Get the index of rd within n. + i %= LOG_BASE; + + // Get the index of rd within n, adjusted for leading zeros. + // The number of leading zeros of n is given by LOG_BASE - d. + j = i - LOG_BASE + d; + + // Get the rounding digit at index j of n. + rd = j < 0 ? 0 : n / pows10[ d - j - 1 ] % 10 | 0; + } + } + + r = r || sd < 0 || + + // Are there any non-zero digits after the rounding digit? + // The expression n % pows10[ d - j - 1 ] returns all digits of n to the right + // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714. + xc[ni + 1] != null || ( j < 0 ? n : n % pows10[ d - j - 1 ] ); + + r = rm < 4 + ? ( rd || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) ) + : rd > 5 || rd == 5 && ( rm == 4 || r || rm == 6 && + + // Check whether the digit to the left of the rounding digit is odd. + ( ( i > 0 ? j > 0 ? n / pows10[ d - j ] : 0 : xc[ni - 1] ) % 10 ) & 1 || + rm == ( x.s < 0 ? 8 : 7 ) ); + + if ( sd < 1 || !xc[0] ) { + xc.length = 0; + + if (r) { + + // Convert sd to decimal places. + sd -= x.e + 1; + + // 1, 0.1, 0.01, 0.001, 0.0001 etc. + xc[0] = pows10[ ( LOG_BASE - sd % LOG_BASE ) % LOG_BASE ]; + x.e = -sd || 0; + } else { + + // Zero. + xc[0] = x.e = 0; + } + + return x; + } + + // Remove excess digits. + if ( i == 0 ) { + xc.length = ni; + k = 1; + ni--; + } else { + xc.length = ni + 1; + k = pows10[ LOG_BASE - i ]; + + // E.g. 56700 becomes 56000 if 7 is the rounding digit. + // j > 0 means i > number of leading zeros of n. + xc[ni] = j > 0 ? mathfloor( n / pows10[ d - j ] % pows10[j] ) * k : 0; + } + + // Round up? + if (r) { + + for ( ; ; ) { + + // If the digit to be rounded up is in the first element of xc... + if ( ni == 0 ) { + + // i will be the length of xc[0] before k is added. + for ( i = 1, j = xc[0]; j >= 10; j /= 10, i++ ); + j = xc[0] += k; + for ( k = 1; j >= 10; j /= 10, k++ ); + + // if i != k the length has increased. + if ( i != k ) { + x.e++; + if ( xc[0] == BASE ) xc[0] = 1; + } + + break; + } else { + xc[ni] += k; + if ( xc[ni] != BASE ) break; + xc[ni--] = 0; + k = 1; + } + } + } + + // Remove trailing zeros. + for ( i = xc.length; xc[--i] === 0; xc.pop() ); + } + + // Overflow? Infinity. + if ( x.e > MAX_EXP ) { + x.c = x.e = null; + + // Underflow? Zero. + } else if ( x.e < MIN_EXP ) { + x.c = [ x.e = 0 ]; + } + } + + return x; + } + + + // PROTOTYPE/INSTANCE METHODS + + + /* + * Return a new BigNumber whose value is the absolute value of this BigNumber. + */ + P.absoluteValue = P.abs = function () { + var x = new BigNumber(this); + if ( x.s < 0 ) x.s = 1; + return x; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole + * number in the direction of Infinity. + */ + P.ceil = function () { + return round( new BigNumber(this), this.e + 1, 2 ); + }; + + + /* + * Return + * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), + * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), + * 0 if they have the same value, + * or null if the value of either is NaN. + */ + P.comparedTo = P.cmp = function ( y, b ) { + id = 1; + return compare( this, new BigNumber( y, b ) ); + }; + + + /* + * Return the number of decimal places of the value of this BigNumber, or null if the value + * of this BigNumber is ±Infinity or NaN. + */ + P.decimalPlaces = P.dp = function () { + var n, v, + c = this.c; + + if ( !c ) return null; + n = ( ( v = c.length - 1 ) - bitFloor( this.e / LOG_BASE ) ) * LOG_BASE; + + // Subtract the number of trailing zeros of the last number. + if ( v = c[v] ) for ( ; v % 10 == 0; v /= 10, n-- ); + if ( n < 0 ) n = 0; + + return n; + }; + + + /* + * n / 0 = I + * n / N = N + * n / I = 0 + * 0 / n = 0 + * 0 / 0 = N + * 0 / N = N + * 0 / I = 0 + * N / n = N + * N / 0 = N + * N / N = N + * N / I = N + * I / n = I + * I / 0 = I + * I / N = N + * I / I = N + * + * Return a new BigNumber whose value is the value of this BigNumber divided by the value of + * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. + */ + P.dividedBy = P.div = function ( y, b ) { + id = 3; + return div( this, new BigNumber( y, b ), DECIMAL_PLACES, ROUNDING_MODE ); + }; + + + /* + * Return a new BigNumber whose value is the integer part of dividing the value of this + * BigNumber by the value of BigNumber(y, b). + */ + P.dividedToIntegerBy = P.divToInt = function ( y, b ) { + id = 4; + return div( this, new BigNumber( y, b ), 0, 1 ); + }; + + + /* + * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), + * otherwise returns false. + */ + P.equals = P.eq = function ( y, b ) { + id = 5; + return compare( this, new BigNumber( y, b ) ) === 0; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole + * number in the direction of -Infinity. + */ + P.floor = function () { + return round( new BigNumber(this), this.e + 1, 3 ); + }; + + + /* + * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), + * otherwise returns false. + */ + P.greaterThan = P.gt = function ( y, b ) { + id = 6; + return compare( this, new BigNumber( y, b ) ) > 0; + }; + + + /* + * Return true if the value of this BigNumber is greater than or equal to the value of + * BigNumber(y, b), otherwise returns false. + */ + P.greaterThanOrEqualTo = P.gte = function ( y, b ) { + id = 7; + return ( b = compare( this, new BigNumber( y, b ) ) ) === 1 || b === 0; + + }; + + + /* + * Return true if the value of this BigNumber is a finite number, otherwise returns false. + */ + P.isFinite = function () { + return !!this.c; + }; + + + /* + * Return true if the value of this BigNumber is an integer, otherwise return false. + */ + P.isInteger = P.isInt = function () { + return !!this.c && bitFloor( this.e / LOG_BASE ) > this.c.length - 2; + }; + + + /* + * Return true if the value of this BigNumber is NaN, otherwise returns false. + */ + P.isNaN = function () { + return !this.s; + }; + + + /* + * Return true if the value of this BigNumber is negative, otherwise returns false. + */ + P.isNegative = P.isNeg = function () { + return this.s < 0; + }; + + + /* + * Return true if the value of this BigNumber is 0 or -0, otherwise returns false. + */ + P.isZero = function () { + return !!this.c && this.c[0] == 0; + }; + + + /* + * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), + * otherwise returns false. + */ + P.lessThan = P.lt = function ( y, b ) { + id = 8; + return compare( this, new BigNumber( y, b ) ) < 0; + }; + + + /* + * Return true if the value of this BigNumber is less than or equal to the value of + * BigNumber(y, b), otherwise returns false. + */ + P.lessThanOrEqualTo = P.lte = function ( y, b ) { + id = 9; + return ( b = compare( this, new BigNumber( y, b ) ) ) === -1 || b === 0; + }; + + + /* + * n - 0 = n + * n - N = N + * n - I = -I + * 0 - n = -n + * 0 - 0 = 0 + * 0 - N = N + * 0 - I = -I + * N - n = N + * N - 0 = N + * N - N = N + * N - I = N + * I - n = I + * I - 0 = I + * I - N = N + * I - I = N + * + * Return a new BigNumber whose value is the value of this BigNumber minus the value of + * BigNumber(y, b). + */ + P.minus = P.sub = function ( y, b ) { + var i, j, t, xLTy, + x = this, + a = x.s; + + id = 10; + y = new BigNumber( y, b ); + b = y.s; + + // Either NaN? + if ( !a || !b ) return new BigNumber(NaN); + + // Signs differ? + if ( a != b ) { + y.s = -b; + return x.plus(y); + } + + var xe = x.e / LOG_BASE, + ye = y.e / LOG_BASE, + xc = x.c, + yc = y.c; + + if ( !xe || !ye ) { + + // Either Infinity? + if ( !xc || !yc ) return xc ? ( y.s = -b, y ) : new BigNumber( yc ? x : NaN ); + + // Either zero? + if ( !xc[0] || !yc[0] ) { + + // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. + return yc[0] ? ( y.s = -b, y ) : new BigNumber( xc[0] ? x : + + // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity + ROUNDING_MODE == 3 ? -0 : 0 ); + } + } + + xe = bitFloor(xe); + ye = bitFloor(ye); + xc = xc.slice(); + + // Determine which is the bigger number. + if ( a = xe - ye ) { + + if ( xLTy = a < 0 ) { + a = -a; + t = xc; + } else { + ye = xe; + t = yc; + } + + t.reverse(); + + // Prepend zeros to equalise exponents. + for ( b = a; b--; t.push(0) ); + t.reverse(); + } else { + + // Exponents equal. Check digit by digit. + j = ( xLTy = ( a = xc.length ) < ( b = yc.length ) ) ? a : b; + + for ( a = b = 0; b < j; b++ ) { + + if ( xc[b] != yc[b] ) { + xLTy = xc[b] < yc[b]; + break; + } + } + } + + // x < y? Point xc to the array of the bigger number. + if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s; + + b = ( j = yc.length ) - ( i = xc.length ); + + // Append zeros to xc if shorter. + // No need to add zeros to yc if shorter as subtract only needs to start at yc.length. + if ( b > 0 ) for ( ; b--; xc[i++] = 0 ); + b = BASE - 1; + + // Subtract yc from xc. + for ( ; j > a; ) { + + if ( xc[--j] < yc[j] ) { + for ( i = j; i && !xc[--i]; xc[i] = b ); + --xc[i]; + xc[j] += BASE; + } + + xc[j] -= yc[j]; + } + + // Remove leading zeros and adjust exponent accordingly. + for ( ; xc[0] == 0; xc.shift(), --ye ); + + // Zero? + if ( !xc[0] ) { + + // Following IEEE 754 (2008) 6.3, + // n - n = +0 but n - n = -0 when rounding towards -Infinity. + y.s = ROUNDING_MODE == 3 ? -1 : 1; + y.c = [ y.e = 0 ]; + return y; + } + + // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity + // for finite x and y. + return normalise( y, xc, ye ); + }; + + + /* + * n % 0 = N + * n % N = N + * n % I = n + * 0 % n = 0 + * -0 % n = -0 + * 0 % 0 = N + * 0 % N = N + * 0 % I = 0 + * N % n = N + * N % 0 = N + * N % N = N + * N % I = N + * I % n = N + * I % 0 = N + * I % N = N + * I % I = N + * + * Return a new BigNumber whose value is the value of this BigNumber modulo the value of + * BigNumber(y, b). The result depends on the value of MODULO_MODE. + */ + P.modulo = P.mod = function ( y, b ) { + var q, s, + x = this; + + id = 11; + y = new BigNumber( y, b ); + + // Return NaN if x is Infinity or NaN, or y is NaN or zero. + if ( !x.c || !y.s || y.c && !y.c[0] ) { + return new BigNumber(NaN); + + // Return x if y is Infinity or x is zero. + } else if ( !y.c || x.c && !x.c[0] ) { + return new BigNumber(x); + } + + if ( MODULO_MODE == 9 ) { + + // Euclidian division: q = sign(y) * floor(x / abs(y)) + // r = x - qy where 0 <= r < abs(y) + s = y.s; + y.s = 1; + q = div( x, y, 0, 3 ); + y.s = s; + q.s *= s; + } else { + q = div( x, y, 0, MODULO_MODE ); + } + + return x.minus( q.times(y) ); + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber negated, + * i.e. multiplied by -1. + */ + P.negated = P.neg = function () { + var x = new BigNumber(this); + x.s = -x.s || null; + return x; + }; + + + /* + * n + 0 = n + * n + N = N + * n + I = I + * 0 + n = n + * 0 + 0 = 0 + * 0 + N = N + * 0 + I = I + * N + n = N + * N + 0 = N + * N + N = N + * N + I = N + * I + n = I + * I + 0 = I + * I + N = N + * I + I = I + * + * Return a new BigNumber whose value is the value of this BigNumber plus the value of + * BigNumber(y, b). + */ + P.plus = P.add = function ( y, b ) { + var t, + x = this, + a = x.s; + + id = 12; + y = new BigNumber( y, b ); + b = y.s; + + // Either NaN? + if ( !a || !b ) return new BigNumber(NaN); + + // Signs differ? + if ( a != b ) { + y.s = -b; + return x.minus(y); + } + + var xe = x.e / LOG_BASE, + ye = y.e / LOG_BASE, + xc = x.c, + yc = y.c; + + if ( !xe || !ye ) { + + // Return ±Infinity if either ±Infinity. + if ( !xc || !yc ) return new BigNumber( a / 0 ); + + // Either zero? + // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. + if ( !xc[0] || !yc[0] ) return yc[0] ? y : new BigNumber( xc[0] ? x : a * 0 ); + } + + xe = bitFloor(xe); + ye = bitFloor(ye); + xc = xc.slice(); + + // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts. + if ( a = xe - ye ) { + if ( a > 0 ) { + ye = xe; + t = yc; + } else { + a = -a; + t = xc; + } + + t.reverse(); + for ( ; a--; t.push(0) ); + t.reverse(); + } + + a = xc.length; + b = yc.length; + + // Point xc to the longer array, and b to the shorter length. + if ( a - b < 0 ) t = yc, yc = xc, xc = t, b = a; + + // Only start adding at yc.length - 1 as the further digits of xc can be ignored. + for ( a = 0; b; ) { + a = ( xc[--b] = xc[b] + yc[b] + a ) / BASE | 0; + xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE; + } + + if (a) { + xc.unshift(a); + ++ye; + } + + // No need to check for zero, as +x + +y != 0 && -x + -y != 0 + // ye = MAX_EXP + 1 possible + return normalise( y, xc, ye ); + }; + + + /* + * Return the number of significant digits of the value of this BigNumber. + * + * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0. + */ + P.precision = P.sd = function (z) { + var n, v, + x = this, + c = x.c; + + // 'precision() argument not a boolean or binary digit: {z}' + if ( z != null && z !== !!z && z !== 1 && z !== 0 ) { + if (ERRORS) raise( 13, 'argument' + notBool, z ); + if ( z != !!z ) z = null; + } + + if ( !c ) return null; + v = c.length - 1; + n = v * LOG_BASE + 1; + + if ( v = c[v] ) { + + // Subtract the number of trailing zeros of the last element. + for ( ; v % 10 == 0; v /= 10, n-- ); + + // Add the number of digits of the first element. + for ( v = c[0]; v >= 10; v /= 10, n++ ); + } + + if ( z && x.e + 1 > n ) n = x.e + 1; + + return n; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of + * dp decimal places using rounding mode rm, or to 0 and ROUNDING_MODE respectively if + * omitted. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'round() decimal places out of range: {dp}' + * 'round() decimal places not an integer: {dp}' + * 'round() rounding mode not an integer: {rm}' + * 'round() rounding mode out of range: {rm}' + */ + P.round = function ( dp, rm ) { + var n = new BigNumber(this); + + if ( dp == null || isValidInt( dp, 0, MAX, 15 ) ) { + round( n, ~~dp + this.e + 1, rm == null || + !isValidInt( rm, 0, 8, 15, roundingMode ) ? ROUNDING_MODE : rm | 0 ); + } + + return n; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber shifted by k places + * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. + * + * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + * + * If k is out of range and ERRORS is false, the result will be ±0 if k < 0, or ±Infinity + * otherwise. + * + * 'shift() argument not an integer: {k}' + * 'shift() argument out of range: {k}' + */ + P.shift = function (k) { + var n = this; + return isValidInt( k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 16, 'argument' ) + + // k < 1e+21, or truncate(k) will produce exponential notation. + ? n.times( '1e' + truncate(k) ) + : new BigNumber( n.c && n.c[0] && ( k < -MAX_SAFE_INTEGER || k > MAX_SAFE_INTEGER ) + ? n.s * ( k < 0 ? 0 : 1 / 0 ) + : n ); + }; + + + /* + * sqrt(-n) = N + * sqrt( N) = N + * sqrt(-I) = N + * sqrt( I) = I + * sqrt( 0) = 0 + * sqrt(-0) = -0 + * + * Return a new BigNumber whose value is the square root of the value of this BigNumber, + * rounded according to DECIMAL_PLACES and ROUNDING_MODE. + */ + P.squareRoot = P.sqrt = function () { + var m, n, r, rep, t, + x = this, + c = x.c, + s = x.s, + e = x.e, + dp = DECIMAL_PLACES + 4, + half = new BigNumber('0.5'); + + // Negative/NaN/Infinity/zero? + if ( s !== 1 || !c || !c[0] ) { + return new BigNumber( !s || s < 0 && ( !c || c[0] ) ? NaN : c ? x : 1 / 0 ); + } + + // Initial estimate. + s = Math.sqrt( +x ); + + // Math.sqrt underflow/overflow? + // Pass x to Math.sqrt as integer, then adjust the exponent of the result. + if ( s == 0 || s == 1 / 0 ) { + n = coeffToString(c); + if ( ( n.length + e ) % 2 == 0 ) n += '0'; + s = Math.sqrt(n); + e = bitFloor( ( e + 1 ) / 2 ) - ( e < 0 || e % 2 ); + + if ( s == 1 / 0 ) { + n = '1e' + e; + } else { + n = s.toExponential(); + n = n.slice( 0, n.indexOf('e') + 1 ) + e; + } + + r = new BigNumber(n); + } else { + r = new BigNumber( s + '' ); + } + + // Check for zero. + // r could be zero if MIN_EXP is changed after the this value was created. + // This would cause a division by zero (x/t) and hence Infinity below, which would cause + // coeffToString to throw. + if ( r.c[0] ) { + e = r.e; + s = e + dp; + if ( s < 3 ) s = 0; + + // Newton-Raphson iteration. + for ( ; ; ) { + t = r; + r = half.times( t.plus( div( x, t, dp, 1 ) ) ); + + if ( coeffToString( t.c ).slice( 0, s ) === ( n = + coeffToString( r.c ) ).slice( 0, s ) ) { + + // The exponent of r may here be one less than the final result exponent, + // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits + // are indexed correctly. + if ( r.e < e ) --s; + n = n.slice( s - 3, s + 1 ); + + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits + // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the + // iteration. + if ( n == '9999' || !rep && n == '4999' ) { + + // On the first iteration only, check to see if rounding up gives the + // exact result as the nines may infinitely repeat. + if ( !rep ) { + round( t, t.e + DECIMAL_PLACES + 2, 0 ); + + if ( t.times(t).eq(x) ) { + r = t; + break; + } + } + + dp += 4; + s += 4; + rep = 1; + } else { + + // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact + // result. If not, then there are further digits and m will be truthy. + if ( !+n || !+n.slice(1) && n.charAt(0) == '5' ) { + + // Truncate to the first rounding digit. + round( r, r.e + DECIMAL_PLACES + 2, 1 ); + m = !r.times(r).eq(x); + } + + break; + } + } + } + } + + return round( r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m ); + }; + + + /* + * n * 0 = 0 + * n * N = N + * n * I = I + * 0 * n = 0 + * 0 * 0 = 0 + * 0 * N = N + * 0 * I = N + * N * n = N + * N * 0 = N + * N * N = N + * N * I = N + * I * n = I + * I * 0 = N + * I * N = N + * I * I = I + * + * Return a new BigNumber whose value is the value of this BigNumber times the value of + * BigNumber(y, b). + */ + P.times = P.mul = function ( y, b ) { + var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, + base, sqrtBase, + x = this, + xc = x.c, + yc = ( id = 17, y = new BigNumber( y, b ) ).c; + + // Either NaN, ±Infinity or ±0? + if ( !xc || !yc || !xc[0] || !yc[0] ) { + + // Return NaN if either is NaN, or one is 0 and the other is Infinity. + if ( !x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc ) { + y.c = y.e = y.s = null; + } else { + y.s *= x.s; + + // Return ±Infinity if either is ±Infinity. + if ( !xc || !yc ) { + y.c = y.e = null; + + // Return ±0 if either is ±0. + } else { + y.c = [0]; + y.e = 0; + } + } + + return y; + } + + e = bitFloor( x.e / LOG_BASE ) + bitFloor( y.e / LOG_BASE ); + y.s *= x.s; + xcL = xc.length; + ycL = yc.length; + + // Ensure xc points to longer array and xcL to its length. + if ( xcL < ycL ) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i; + + // Initialise the result array with zeros. + for ( i = xcL + ycL, zc = []; i--; zc.push(0) ); + + base = BASE; + sqrtBase = SQRT_BASE; + + for ( i = ycL; --i >= 0; ) { + c = 0; + ylo = yc[i] % sqrtBase; + yhi = yc[i] / sqrtBase | 0; + + for ( k = xcL, j = i + k; j > i; ) { + xlo = xc[--k] % sqrtBase; + xhi = xc[k] / sqrtBase | 0; + m = yhi * xlo + xhi * ylo; + xlo = ylo * xlo + ( ( m % sqrtBase ) * sqrtBase ) + zc[j] + c; + c = ( xlo / base | 0 ) + ( m / sqrtBase | 0 ) + yhi * xhi; + zc[j--] = xlo % base; + } + + zc[j] = c; + } + + if (c) { + ++e; + } else { + zc.shift(); + } + + return normalise( y, zc, e ); + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of + * sd significant digits using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toDigits() precision out of range: {sd}' + * 'toDigits() precision not an integer: {sd}' + * 'toDigits() rounding mode not an integer: {rm}' + * 'toDigits() rounding mode out of range: {rm}' + */ + P.toDigits = function ( sd, rm ) { + var n = new BigNumber(this); + sd = sd == null || !isValidInt( sd, 1, MAX, 18, 'precision' ) ? null : sd | 0; + rm = rm == null || !isValidInt( rm, 0, 8, 18, roundingMode ) ? ROUNDING_MODE : rm | 0; + return sd ? round( n, sd, rm ) : n; + }; + + + /* + * Return a string representing the value of this BigNumber in exponential notation and + * rounded using ROUNDING_MODE to dp fixed decimal places. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toExponential() decimal places not an integer: {dp}' + * 'toExponential() decimal places out of range: {dp}' + * 'toExponential() rounding mode not an integer: {rm}' + * 'toExponential() rounding mode out of range: {rm}' + */ + P.toExponential = function ( dp, rm ) { + return format( this, + dp != null && isValidInt( dp, 0, MAX, 19 ) ? ~~dp + 1 : null, rm, 19 ); + }; + + + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounding + * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', + * but e.g. (-0.00001).toFixed(0) is '-0'. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toFixed() decimal places not an integer: {dp}' + * 'toFixed() decimal places out of range: {dp}' + * 'toFixed() rounding mode not an integer: {rm}' + * 'toFixed() rounding mode out of range: {rm}' + */ + P.toFixed = function ( dp, rm ) { + return format( this, dp != null && isValidInt( dp, 0, MAX, 20 ) + ? ~~dp + this.e + 1 : null, rm, 20 ); + }; + + + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounded + * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties + * of the FORMAT object (see BigNumber.config). + * + * FORMAT = { + * decimalSeparator : '.', + * groupSeparator : ',', + * groupSize : 3, + * secondaryGroupSize : 0, + * fractionGroupSeparator : '\xA0', // non-breaking space + * fractionGroupSize : 0 + * }; + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toFormat() decimal places not an integer: {dp}' + * 'toFormat() decimal places out of range: {dp}' + * 'toFormat() rounding mode not an integer: {rm}' + * 'toFormat() rounding mode out of range: {rm}' + */ + P.toFormat = function ( dp, rm ) { + var str = format( this, dp != null && isValidInt( dp, 0, MAX, 21 ) + ? ~~dp + this.e + 1 : null, rm, 21 ); + + if ( this.c ) { + var i, + arr = str.split('.'), + g1 = +FORMAT.groupSize, + g2 = +FORMAT.secondaryGroupSize, + groupSeparator = FORMAT.groupSeparator, + intPart = arr[0], + fractionPart = arr[1], + isNeg = this.s < 0, + intDigits = isNeg ? intPart.slice(1) : intPart, + len = intDigits.length; + + if (g2) i = g1, g1 = g2, g2 = i, len -= i; + + if ( g1 > 0 && len > 0 ) { + i = len % g1 || g1; + intPart = intDigits.substr( 0, i ); + + for ( ; i < len; i += g1 ) { + intPart += groupSeparator + intDigits.substr( i, g1 ); + } + + if ( g2 > 0 ) intPart += groupSeparator + intDigits.slice(i); + if (isNeg) intPart = '-' + intPart; + } + + str = fractionPart + ? intPart + FORMAT.decimalSeparator + ( ( g2 = +FORMAT.fractionGroupSize ) + ? fractionPart.replace( new RegExp( '\\d{' + g2 + '}\\B', 'g' ), + '$&' + FORMAT.fractionGroupSeparator ) + : fractionPart ) + : intPart; + } + + return str; + }; + + + /* + * Return a string array representing the value of this BigNumber as a simple fraction with + * an integer numerator and an integer denominator. The denominator will be a positive + * non-zero value less than or equal to the specified maximum denominator. If a maximum + * denominator is not specified, the denominator will be the lowest value necessary to + * represent the number exactly. + * + * [md] {number|string|BigNumber} Integer >= 1 and < Infinity. The maximum denominator. + * + * 'toFraction() max denominator not an integer: {md}' + * 'toFraction() max denominator out of range: {md}' + */ + P.toFraction = function (md) { + var arr, d0, d2, e, exp, n, n0, q, s, + k = ERRORS, + x = this, + xc = x.c, + d = new BigNumber(ONE), + n1 = d0 = new BigNumber(ONE), + d1 = n0 = new BigNumber(ONE); + + if ( md != null ) { + ERRORS = false; + n = new BigNumber(md); + ERRORS = k; + + if ( !( k = n.isInt() ) || n.lt(ONE) ) { + + if (ERRORS) { + raise( 22, + 'max denominator ' + ( k ? 'out of range' : 'not an integer' ), md ); + } + + // ERRORS is false: + // If md is a finite non-integer >= 1, round it to an integer and use it. + md = !k && n.c && round( n, n.e + 1, 1 ).gte(ONE) ? n : null; + } + } + + if ( !xc ) return x.toString(); + s = coeffToString(xc); + + // Determine initial denominator. + // d is a power of 10 and the minimum max denominator that specifies the value exactly. + e = d.e = s.length - x.e - 1; + d.c[0] = POWS_TEN[ ( exp = e % LOG_BASE ) < 0 ? LOG_BASE + exp : exp ]; + md = !md || n.cmp(d) > 0 ? ( e > 0 ? d : n1 ) : n; + + exp = MAX_EXP; + MAX_EXP = 1 / 0; + n = new BigNumber(s); + + // n0 = d1 = 0 + n0.c[0] = 0; + + for ( ; ; ) { + q = div( n, d, 0, 1 ); + d2 = d0.plus( q.times(d1) ); + if ( d2.cmp(md) == 1 ) break; + d0 = d1; + d1 = d2; + n1 = n0.plus( q.times( d2 = n1 ) ); + n0 = d2; + d = n.minus( q.times( d2 = d ) ); + n = d2; + } + + d2 = div( md.minus(d0), d1, 0, 1 ); + n0 = n0.plus( d2.times(n1) ); + d0 = d0.plus( d2.times(d1) ); + n0.s = n1.s = x.s; + e *= 2; + + // Determine which fraction is closer to x, n0/d0 or n1/d1 + arr = div( n1, d1, e, ROUNDING_MODE ).minus(x).abs().cmp( + div( n0, d0, e, ROUNDING_MODE ).minus(x).abs() ) < 1 + ? [ n1.toString(), d1.toString() ] + : [ n0.toString(), d0.toString() ]; + + MAX_EXP = exp; + return arr; + }; + + + /* + * Return the value of this BigNumber converted to a number primitive. + */ + P.toNumber = function () { + return +this; + }; + + + /* + * Return a BigNumber whose value is the value of this BigNumber raised to the power n. + * If m is present, return the result modulo m. + * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. + * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using + * ROUNDING_MODE. + * + * The modular power operation works efficiently when x, n, and m are positive integers, + * otherwise it is equivalent to calculating x.toPower(n).modulo(m) (with POW_PRECISION 0). + * + * n {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + * [m] {number|string|BigNumber} The modulus. + * + * 'pow() exponent not an integer: {n}' + * 'pow() exponent out of range: {n}' + * + * Performs 54 loop iterations for n of 9007199254740991. + */ + P.toPower = P.pow = function ( n, m ) { + var k, y, z, + i = mathfloor( n < 0 ? -n : +n ), + x = this; + + if ( m != null ) { + id = 23; + m = new BigNumber(m); + } + + // Pass ±Infinity to Math.pow if exponent is out of range. + if ( !isValidInt( n, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 23, 'exponent' ) && + ( !isFinite(n) || i > MAX_SAFE_INTEGER && ( n /= 0 ) || + parseFloat(n) != n && !( n = NaN ) ) || n == 0 ) { + k = Math.pow( +x, n ); + return new BigNumber( m ? k % m : k ); + } + + if (m) { + if ( n > 1 && x.gt(ONE) && x.isInt() && m.gt(ONE) && m.isInt() ) { + x = x.mod(m); + } else { + z = m; + + // Nullify m so only a single mod operation is performed at the end. + m = null; + } + } else if (POW_PRECISION) { + + // Truncating each coefficient array to a length of k after each multiplication + // equates to truncating significant digits to POW_PRECISION + [28, 41], + // i.e. there will be a minimum of 28 guard digits retained. + // (Using + 1.5 would give [9, 21] guard digits.) + k = mathceil( POW_PRECISION / LOG_BASE + 2 ); + } + + y = new BigNumber(ONE); + + for ( ; ; ) { + if ( i % 2 ) { + y = y.times(x); + if ( !y.c ) break; + if (k) { + if ( y.c.length > k ) y.c.length = k; + } else if (m) { + y = y.mod(m); + } + } + + i = mathfloor( i / 2 ); + if ( !i ) break; + x = x.times(x); + if (k) { + if ( x.c && x.c.length > k ) x.c.length = k; + } else if (m) { + x = x.mod(m); + } + } + + if (m) return y; + if ( n < 0 ) y = ONE.div(y); + + return z ? y.mod(z) : k ? round( y, POW_PRECISION, ROUNDING_MODE ) : y; + }; + + + /* + * Return a string representing the value of this BigNumber rounded to sd significant digits + * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits + * necessary to represent the integer part of the value in fixed-point notation, then use + * exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toPrecision() precision not an integer: {sd}' + * 'toPrecision() precision out of range: {sd}' + * 'toPrecision() rounding mode not an integer: {rm}' + * 'toPrecision() rounding mode out of range: {rm}' + */ + P.toPrecision = function ( sd, rm ) { + return format( this, sd != null && isValidInt( sd, 1, MAX, 24, 'precision' ) + ? sd | 0 : null, rm, 24 ); + }; + + + /* + * Return a string representing the value of this BigNumber in base b, or base 10 if b is + * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and + * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent + * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than + * TO_EXP_NEG, return exponential notation. + * + * [b] {number} Integer, 2 to 64 inclusive. + * + * 'toString() base not an integer: {b}' + * 'toString() base out of range: {b}' + */ + P.toString = function (b) { + var str, + n = this, + s = n.s, + e = n.e; + + // Infinity or NaN? + if ( e === null ) { + + if (s) { + str = 'Infinity'; + if ( s < 0 ) str = '-' + str; + } else { + str = 'NaN'; + } + } else { + str = coeffToString( n.c ); + + if ( b == null || !isValidInt( b, 2, 64, 25, 'base' ) ) { + str = e <= TO_EXP_NEG || e >= TO_EXP_POS + ? toExponential( str, e ) + : toFixedPoint( str, e ); + } else { + str = convertBase( toFixedPoint( str, e ), b | 0, 10, s ); + } + + if ( s < 0 && n.c[0] ) str = '-' + str; + } + + return str; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber truncated to a whole + * number. + */ + P.truncated = P.trunc = function () { + return round( new BigNumber(this), this.e + 1, 1 ); + }; + + + /* + * Return as toString, but do not accept a base argument, and include the minus sign for + * negative zero. + */ + P.valueOf = P.toJSON = function () { + var str, + n = this, + e = n.e; + + if ( e === null ) return n.toString(); + + str = coeffToString( n.c ); + + str = e <= TO_EXP_NEG || e >= TO_EXP_POS + ? toExponential( str, e ) + : toFixedPoint( str, e ); + + return n.s < 0 ? '-' + str : str; + }; + + + if ( configObj != null ) BigNumber.config(configObj); + + return BigNumber; + } + + + // PRIVATE HELPER FUNCTIONS + + + function bitFloor(n) { + var i = n | 0; + return n > 0 || n === i ? i : i - 1; + } + + + // Return a coefficient array as a string of base 10 digits. + function coeffToString(a) { + var s, z, + i = 1, + j = a.length, + r = a[0] + ''; + + for ( ; i < j; ) { + s = a[i++] + ''; + z = LOG_BASE - s.length; + for ( ; z--; s = '0' + s ); + r += s; + } + + // Determine trailing zeros. + for ( j = r.length; r.charCodeAt(--j) === 48; ); + return r.slice( 0, j + 1 || 1 ); + } + + + // Compare the value of BigNumbers x and y. + function compare( x, y ) { + var a, b, + xc = x.c, + yc = y.c, + i = x.s, + j = y.s, + k = x.e, + l = y.e; + + // Either NaN? + if ( !i || !j ) return null; + + a = xc && !xc[0]; + b = yc && !yc[0]; + + // Either zero? + if ( a || b ) return a ? b ? 0 : -j : i; + + // Signs differ? + if ( i != j ) return i; + + a = i < 0; + b = k == l; + + // Either Infinity? + if ( !xc || !yc ) return b ? 0 : !xc ^ a ? 1 : -1; + + // Compare exponents. + if ( !b ) return k > l ^ a ? 1 : -1; + + j = ( k = xc.length ) < ( l = yc.length ) ? k : l; + + // Compare digit by digit. + for ( i = 0; i < j; i++ ) if ( xc[i] != yc[i] ) return xc[i] > yc[i] ^ a ? 1 : -1; + + // Compare lengths. + return k == l ? 0 : k > l ^ a ? 1 : -1; + } + + + /* + * Return true if n is a valid number in range, otherwise false. + * Use for argument validation when ERRORS is false. + * Note: parseInt('1e+1') == 1 but parseFloat('1e+1') == 10. + */ + function intValidatorNoErrors( n, min, max ) { + return ( n = truncate(n) ) >= min && n <= max; + } + + + function isArray(obj) { + return Object.prototype.toString.call(obj) == '[object Array]'; + } + + + function isBigNumber(v) { + return !!( v && v.constructor && v.constructor.isBigNumber === isBigNumber ); + } + + + /* + * Convert string of baseIn to an array of numbers of baseOut. + * Eg. convertBase('255', 10, 16) returns [15, 15]. + * Eg. convertBase('ff', 16, 10) returns [2, 5, 5]. + */ + function toBaseOut( str, baseIn, baseOut ) { + var j, + arr = [0], + arrL, + i = 0, + len = str.length; + + for ( ; i < len; ) { + for ( arrL = arr.length; arrL--; arr[arrL] *= baseIn ); + arr[ j = 0 ] += ALPHABET.indexOf( str.charAt( i++ ) ); + + for ( ; j < arr.length; j++ ) { + + if ( arr[j] > baseOut - 1 ) { + if ( arr[j + 1] == null ) arr[j + 1] = 0; + arr[j + 1] += arr[j] / baseOut | 0; + arr[j] %= baseOut; + } + } + } + + return arr.reverse(); + } + + + function toExponential( str, e ) { + return ( str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str ) + + ( e < 0 ? 'e' : 'e+' ) + e; + } + + + function toFixedPoint( str, e ) { + var len, z; + + // Negative exponent? + if ( e < 0 ) { + + // Prepend zeros. + for ( z = '0.'; ++e; z += '0' ); + str = z + str; + + // Positive exponent + } else { + len = str.length; + + // Append zeros. + if ( ++e > len ) { + for ( z = '0', e -= len; --e; z += '0' ); + str += z; + } else if ( e < len ) { + str = str.slice( 0, e ) + '.' + str.slice(e); + } + } + + return str; + } + + + function truncate(n) { + n = parseFloat(n); + return n < 0 ? mathceil(n) : mathfloor(n); + } + + + // EXPORT + + + BigNumber = constructorFactory(); + BigNumber.default = BigNumber.BigNumber = BigNumber; + + + // AMD. + if ( typeof define == 'function' && define.amd ) { + define( function () { return BigNumber; } ); + + // Node.js and other environments that support module.exports. + } else if ( typeof module != 'undefined' && module.exports ) { + module.exports = BigNumber; + + // Browser. + } else { + if ( !globalObj ) globalObj = typeof self != 'undefined' ? self : Function('return this')(); + globalObj.BigNumber = BigNumber; + } +})(this); diff --git a/Server File/node_modules/bignumber.js/bignumber.js.map b/Server File/node_modules/bignumber.js/bignumber.js.map new file mode 100644 index 0000000..5b595f1 --- /dev/null +++ b/Server File/node_modules/bignumber.js/bignumber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bignumber.min.js","sources":["bignumber.js"],"names":["globalObj","constructorFactory","configObj","BigNumber","n","b","c","e","i","num","len","str","x","this","ERRORS","raise","isValidInt","id","round","DECIMAL_PLACES","ROUNDING_MODE","RegExp","ALPHABET","slice","test","parseNumeric","s","replace","length","tooManyDigits","charCodeAt","convertBase","isNumeric","indexOf","search","substring","MAX_SAFE_INTEGER","mathfloor","MAX_EXP","MIN_EXP","LOG_BASE","push","baseOut","baseIn","sign","d","k","r","xc","y","dp","rm","toLowerCase","POW_PRECISION","pow","toBaseOut","toFixedPoint","coeffToString","pop","div","unshift","charAt","format","caller","c0","ne","roundingMode","toString","TO_EXP_NEG","toExponential","maxOrMin","args","method","m","isArray","call","intValidatorWithErrors","min","max","name","truncate","normalise","j","msg","val","error","Error","sd","ni","rd","pows10","POWS_TEN","out","mathceil","BASE","P","prototype","ONE","TO_EXP_POS","CRYPTO","MODULO_MODE","FORMAT","decimalSeparator","groupSeparator","groupSize","secondaryGroupSize","fractionGroupSeparator","fractionGroupSize","another","ROUND_UP","ROUND_DOWN","ROUND_CEIL","ROUND_FLOOR","ROUND_HALF_UP","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_CEIL","ROUND_HALF_FLOOR","EUCLID","config","set","v","p","a","arguments","o","has","hasOwnProperty","MAX","intValidatorNoErrors","notBool","crypto","getRandomValues","randomBytes","isBigNumber","lt","gt","random","pow2_53","random53bitInt","Math","rand","Uint32Array","copy","shift","multiply","base","temp","xlo","xhi","carry","klo","SQRT_BASE","khi","compare","aL","bL","cmp","subtract","more","prod","prodL","q","qc","rem","remL","rem0","xi","xL","yc0","yL","yz","yc","NaN","bitFloor","basePrefix","dotAfter","dotBefore","isInfinityOrNaN","whitespaceOrPlus","isNaN","p1","p2","absoluteValue","abs","ceil","comparedTo","decimalPlaces","dividedBy","dividedToIntegerBy","divToInt","equals","eq","floor","greaterThan","greaterThanOrEqualTo","gte","isFinite","isInteger","isInt","isNegative","isNeg","isZero","lessThan","lessThanOrEqualTo","lte","minus","sub","t","xLTy","plus","xe","ye","reverse","modulo","mod","times","negated","neg","add","precision","z","squareRoot","sqrt","rep","half","mul","xcL","ycL","ylo","yhi","zc","sqrtBase","toDigits","toFixed","toFormat","arr","split","g1","g2","intPart","fractionPart","intDigits","substr","toFraction","md","d0","d2","exp","n0","n1","d1","toNumber","toPower","parseFloat","toPrecision","truncated","trunc","valueOf","toJSON","l","obj","Object","constructor","arrL","define","amd","module","exports","self","Function"],"mappings":";CAEC,SAAWA,GACR,YAqCA,SAASC,GAAmBC,GAiHxB,QAASC,GAAWC,EAAGC,GACnB,GAAIC,GAAGC,EAAGC,EAAGC,EAAKC,EAAKC,EACnBC,EAAIC,IAGR,MAAQD,YAAaT,IAIjB,MADIW,IAAQC,EAAO,GAAI,+BAAgCX,GAChD,GAAID,GAAWC,EAAGC,EAK7B,IAAU,MAALA,GAAcW,EAAYX,EAAG,EAAG,GAAIY,EAAI,QA4BtC,CAMH,GALAZ,EAAQ,EAAJA,EACJM,EAAMP,EAAI,GAIA,IAALC,EAED,MADAO,GAAI,GAAIT,GAAWC,YAAaD,GAAYC,EAAIO,GACzCO,EAAON,EAAGO,EAAiBP,EAAEL,EAAI,EAAGa,EAK/C,KAAOX,EAAkB,gBAALL,KAAuB,EAAJA,GAAS,IAC7C,GAAMiB,QAAQ,OAAUf,EAAI,IAAMgB,EAASC,MAAO,EAAGlB,GAAM,MAC1D,SAAWC,EAAI,MAAU,GAAJD,EAAS,IAAM,IAAOmB,KAAKb,GAChD,MAAOc,GAAcb,EAAGD,EAAKF,EAAKJ,EAGlCI,IACAG,EAAEc,EAAY,EAAR,EAAItB,GAAUO,EAAMA,EAAIY,MAAM,GA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/bignumber.min.js new file mode 100644 index 0000000..8e684f8 --- /dev/null +++ b/Server File/node_modules/bignumber.js/bignumber.min.js @@ -0,0 +1,3 @@ +/* bignumber.js v3.1.2 https://github.com/MikeMcl/bignumber.js/LICENCE */ +!function(e){"use strict";function n(e){function h(e,n){var t,r,i,o,u,s,f=this;if(!(f instanceof h))return V&&I(26,"constructor call without new",e),new h(e,n);if(null!=n&&j(n,2,64,C,"base")){if(n=0|n,s=e+"",10==n)return f=new h(e instanceof h?e:s),L(f,P+f.e+1,q);if((o="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(t="["+N.slice(0,n)+"]+")+"(?:\\."+t+")?$",37>n?"i":"").test(s))return B(f,s,o,n);o?(f.s=0>1/e?(s=s.slice(1),-1):1,V&&s.replace(/^0\.0*|\./,"").length>15&&I(C,v,e),o=!1):f.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1,s=E(s,10,n,f.s)}else{if(e instanceof h)return f.s=e.s,f.e=e.e,f.c=(e=e.c)?e.slice():e,void(C=0);if((o="number"==typeof e)&&0*e==0){if(f.s=0>1/e?(e=-e,-1):1,e===~~e){for(r=0,i=e;i>=10;i/=10,r++);return f.e=r,f.c=[e],void(C=0)}s=e+""}else{if(!g.test(s=e+""))return B(f,s,o);f.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1}}for((r=s.indexOf("."))>-1&&(s=s.replace(".","")),(i=s.search(/e/i))>0?(0>r&&(r=i),r+=+s.slice(i+1),s=s.substring(0,i)):0>r&&(r=s.length),i=0;48===s.charCodeAt(i);i++);for(u=s.length;48===s.charCodeAt(--u););if(s=s.slice(i,u+1))if(u=s.length,o&&V&&u>15&&(e>O||e!==d(e))&&I(C,v,f.s*e),r=r-i-1,r>z)f.c=f.e=null;else if(G>r)f.c=[f.e=0];else{if(f.e=r,f.c=[],i=(r+1)%y,0>r&&(i+=y),u>i){for(i&&f.c.push(+s.slice(0,i)),u-=y;u>i;)f.c.push(+s.slice(i,i+=y));s=s.slice(i),i=y-s.length}else i-=u;for(;i--;s+="0");f.c.push(+s)}else f.c=[f.e=0];C=0}function E(e,n,t,i){var o,u,s,l,a,g,p,d=e.indexOf("."),m=P,w=q;for(37>t&&(e=e.toLowerCase()),d>=0&&(s=J,J=0,e=e.replace(".",""),p=new h(t),a=p.pow(e.length-d),J=s,p.c=f(c(r(a.c),a.e),10,n),p.e=p.c.length),g=f(e,t,n),u=s=g.length;0==g[--s];g.pop());if(!g[0])return"0";if(0>d?--u:(a.c=g,a.e=u,a.s=i,a=U(a,p,m,w,n),g=a.c,l=a.r,u=a.e),o=u+m+1,d=g[o],s=n/2,l=l||0>o||null!=g[o+1],l=4>w?(null!=d||l)&&(0==w||w==(a.s<0?3:2)):d>s||d==s&&(4==w||l||6==w&&1&g[o-1]||w==(a.s<0?8:7)),1>o||!g[0])e=l?c("1",-m):"0";else{if(g.length=o,l)for(--n;++g[--o]>n;)g[o]=0,o||(++u,g.unshift(1));for(s=g.length;!g[--s];);for(d=0,e="";s>=d;e+=N.charAt(g[d++]));e=c(e,u)}return e}function D(e,n,t,i){var o,u,s,f,a;if(t=null!=t&&j(t,0,8,i,w)?0|t:q,!e.c)return e.toString();if(o=e.c[0],s=e.e,null==n)a=r(e.c),a=19==i||24==i&&k>=s?l(a,s):c(a,s);else if(e=L(new h(e),n,t),u=e.e,a=r(e.c),f=a.length,19==i||24==i&&(u>=n||k>=u)){for(;n>f;a+="0",f++);a=l(a,u)}else if(n-=s,a=c(a,u),u+1>f){if(--n>0)for(a+=".";n--;a+="0");}else if(n+=u-f,n>0)for(u+1==f&&(a+=".");n--;a+="0");return e.s<0&&o?"-"+a:a}function F(e,n){var t,r,i=0;for(u(e[0])&&(e=e[0]),t=new h(e[0]);++ie||e>t||e!=a(e))&&I(r,(i||"decimal places")+(n>e||e>t?" out of range":" not an integer"),e),!0}function x(e,n,t){for(var r=1,i=n.length;!n[--i];n.pop());for(i=n[0];i>=10;i/=10,r++);return(t=r+t*y-1)>z?e.c=e.e=null:G>t?e.c=[e.e=0]:(e.e=t,e.c=n),e}function I(e,n,t){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+n+": "+t);throw r.name="BigNumber Error",C=0,r}function L(e,n,t,r){var i,o,u,s,f,l,c,a=e.c,h=R;if(a){e:{for(i=1,s=a[0];s>=10;s/=10,i++);if(o=n-i,0>o)o+=y,u=n,f=a[l=0],c=f/h[i-u-1]%10|0;else if(l=p((o+1)/y),l>=a.length){if(!r)break e;for(;a.length<=l;a.push(0));f=c=0,i=1,o%=y,u=o-y+1}else{for(f=s=a[l],i=1;s>=10;s/=10,i++);o%=y,u=o-y+i,c=0>u?0:f/h[i-u-1]%10|0}if(r=r||0>n||null!=a[l+1]||(0>u?f:f%h[i-u-1]),r=4>t?(c||r)&&(0==t||t==(e.s<0?3:2)):c>5||5==c&&(4==t||r||6==t&&(o>0?u>0?f/h[i-u]:0:a[l-1])%10&1||t==(e.s<0?8:7)),1>n||!a[0])return a.length=0,r?(n-=e.e+1,a[0]=h[(y-n%y)%y],e.e=-n||0):a[0]=e.e=0,e;if(0==o?(a.length=l,s=1,l--):(a.length=l+1,s=h[y-o],a[l]=u>0?d(f/h[i-u]%h[u])*s:0),r)for(;;){if(0==l){for(o=1,u=a[0];u>=10;u/=10,o++);for(u=a[0]+=s,s=1;u>=10;u/=10,s++);o!=s&&(e.e++,a[0]==b&&(a[0]=1));break}if(a[l]+=s,a[l]!=b)break;a[l--]=0,s=1}for(o=a.length;0===a[--o];a.pop());}e.e>z?e.c=e.e=null:e.et?null!=(e=i[t++]):void 0};return f(n="DECIMAL_PLACES")&&j(e,0,A,2,n)&&(P=0|e),r[n]=P,f(n="ROUNDING_MODE")&&j(e,0,8,2,n)&&(q=0|e),r[n]=q,f(n="EXPONENTIAL_AT")&&(u(e)?j(e[0],-A,0,2,n)&&j(e[1],0,A,2,n)&&(k=0|e[0],$=0|e[1]):j(e,-A,A,2,n)&&(k=-($=0|(0>e?-e:e)))),r[n]=[k,$],f(n="RANGE")&&(u(e)?j(e[0],-A,-1,2,n)&&j(e[1],1,A,2,n)&&(G=0|e[0],z=0|e[1]):j(e,-A,A,2,n)&&(0|e?G=-(z=0|(0>e?-e:e)):V&&I(2,n+" cannot be zero",e))),r[n]=[G,z],f(n="ERRORS")&&(e===!!e||1===e||0===e?(C=0,j=(V=!!e)?_:o):V&&I(2,n+m,e)),r[n]=V,f(n="CRYPTO")&&(e===!0||e===!1||1===e||0===e?e?(e="undefined"==typeof crypto,!e&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?H=!0:V?I(2,"crypto unavailable",e?void 0:crypto):H=!1):H=!1:V&&I(2,n+m,e)),r[n]=H,f(n="MODULO_MODE")&&j(e,0,9,2,n)&&(W=0|e),r[n]=W,f(n="POW_PRECISION")&&j(e,0,A,2,n)&&(J=0|e),r[n]=J,f(n="FORMAT")&&("object"==typeof e?X=e:V&&I(2,n+" not an object",e)),r[n]=X,r},h.isBigNumber=s,h.max=function(){return F(arguments,M.lt)},h.min=function(){return F(arguments,M.gt)},h.random=function(){var e=9007199254740992,n=Math.random()*e&2097151?function(){return d(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var t,r,i,o,u,s=0,f=[],l=new h(T);if(e=null!=e&&j(e,0,A,14)?0|e:P,o=p(e/y),H)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));o>s;)u=131072*t[s]+(t[s+1]>>>11),u>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(f.push(u%1e14),s+=2);s=o/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(o*=7);o>s;)u=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6],u>=9e15?crypto.randomBytes(7).copy(t,s):(f.push(u%1e14),s+=7);s=o/7}else H=!1,V&&I(14,"crypto unavailable",crypto);if(!H)for(;o>s;)u=n(),9e15>u&&(f[s++]=u%1e14);for(o=f[--s],e%=y,o&&e&&(u=R[y-e],f[s]=d(o/u)*u);0===f[s];f.pop(),s--);if(0>s)f=[i=0];else{for(i=-1;0===f[0];f.shift(),i-=y);for(s=1,u=f[0];u>=10;u/=10,s++);y>s&&(i-=y-s)}return l.e=i,l.c=f,l}}(),U=function(){function e(e,n,t){var r,i,o,u,s=0,f=e.length,l=n%S,c=n/S|0;for(e=e.slice();f--;)o=e[f]%S,u=e[f]/S|0,r=c*o+u*l,i=l*o+r%S*S+s,s=(i/t|0)+(r/S|0)+c*u,e[f]=i%t;return s&&e.unshift(s),e}function n(e,n,t,r){var i,o;if(t!=r)o=t>r?1:-1;else for(i=o=0;t>i;i++)if(e[i]!=n[i]){o=e[i]>n[i]?1:-1;break}return o}function r(e,n,t,r){for(var i=0;t--;)e[t]-=i,i=e[t]1;e.shift());}return function(i,o,u,s,f){var l,c,a,g,p,m,w,v,N,O,R,S,A,E,D,F,_,x=i.s==o.s?1:-1,I=i.c,U=o.c;if(!(I&&I[0]&&U&&U[0]))return new h(i.s&&o.s&&(I?!U||I[0]!=U[0]:U)?I&&0==I[0]||!U?0*x:x/0:NaN);for(v=new h(x),N=v.c=[],c=i.e-o.e,x=u+c+1,f||(f=b,c=t(i.e/y)-t(o.e/y),x=x/y|0),a=0;U[a]==(I[a]||0);a++);if(U[a]>(I[a]||0)&&c--,0>x)N.push(1),g=!0;else{for(E=I.length,F=U.length,a=0,x+=2,p=d(f/(U[0]+1)),p>1&&(U=e(U,p,f),I=e(I,p,f),F=U.length,E=I.length),A=F,O=I.slice(0,F),R=O.length;F>R;O[R++]=0);_=U.slice(),_.unshift(0),D=U[0],U[1]>=f/2&&D++;do{if(p=0,l=n(U,O,F,R),0>l){if(S=O[0],F!=R&&(S=S*f+(O[1]||0)),p=d(S/D),p>1)for(p>=f&&(p=f-1),m=e(U,p,f),w=m.length,R=O.length;1==n(m,O,w,R);)p--,r(m,w>F?_:U,w,f),w=m.length,l=1;else 0==p&&(l=p=1),m=U.slice(),w=m.length;if(R>w&&m.unshift(0),r(O,m,R,f),R=O.length,-1==l)for(;n(U,O,F,R)<1;)p++,r(O,R>F?_:U,R,f),R=O.length}else 0===l&&(p++,O=[0]);N[a++]=p,O[0]?O[R++]=I[A]||0:(O=[I[A]],R=1)}while((A++=10;x/=10,a++);L(v,u+(v.e=a+c*y-1)+1,s,g)}else v.e=c,v.r=+g;return v}}(),B=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,n=/^([^.]+)\.$/,t=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,u,s,f){var l,c=s?u:u.replace(i,"");if(r.test(c))o.s=isNaN(c)?null:0>c?-1:1;else{if(!s&&(c=c.replace(e,function(e,n,t){return l="x"==(t=t.toLowerCase())?16:"b"==t?2:8,f&&f!=l?e:n}),f&&(l=f,c=c.replace(n,"$1").replace(t,"0.$1")),u!=c))return new h(c,l);V&&I(C,"not a"+(f?" base "+f:"")+" number",u),o.s=null}o.c=o.e=null,C=0}}(),M.absoluteValue=M.abs=function(){var e=new h(this);return e.s<0&&(e.s=1),e},M.ceil=function(){return L(new h(this),this.e+1,2)},M.comparedTo=M.cmp=function(e,n){return C=1,i(this,new h(e,n))},M.decimalPlaces=M.dp=function(){var e,n,r=this.c;if(!r)return null;if(e=((n=r.length-1)-t(this.e/y))*y,n=r[n])for(;n%10==0;n/=10,e--);return 0>e&&(e=0),e},M.dividedBy=M.div=function(e,n){return C=3,U(this,new h(e,n),P,q)},M.dividedToIntegerBy=M.divToInt=function(e,n){return C=4,U(this,new h(e,n),0,1)},M.equals=M.eq=function(e,n){return C=5,0===i(this,new h(e,n))},M.floor=function(){return L(new h(this),this.e+1,3)},M.greaterThan=M.gt=function(e,n){return C=6,i(this,new h(e,n))>0},M.greaterThanOrEqualTo=M.gte=function(e,n){return C=7,1===(n=i(this,new h(e,n)))||0===n},M.isFinite=function(){return!!this.c},M.isInteger=M.isInt=function(){return!!this.c&&t(this.e/y)>this.c.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.lessThan=M.lt=function(e,n){return C=8,i(this,new h(e,n))<0},M.lessThanOrEqualTo=M.lte=function(e,n){return C=9,-1===(n=i(this,new h(e,n)))||0===n},M.minus=M.sub=function(e,n){var r,i,o,u,s=this,f=s.s;if(C=10,e=new h(e,n),n=e.s,!f||!n)return new h(NaN);if(f!=n)return e.s=-n,s.plus(e);var l=s.e/y,c=e.e/y,a=s.c,g=e.c;if(!l||!c){if(!a||!g)return a?(e.s=-n,e):new h(g?s:NaN);if(!a[0]||!g[0])return g[0]?(e.s=-n,e):new h(a[0]?s:3==q?-0:0)}if(l=t(l),c=t(c),a=a.slice(),f=l-c){for((u=0>f)?(f=-f,o=a):(c=l,o=g),o.reverse(),n=f;n--;o.push(0));o.reverse()}else for(i=(u=(f=a.length)<(n=g.length))?f:n,f=n=0;i>n;n++)if(a[n]!=g[n]){u=a[n]0)for(;n--;a[r++]=0);for(n=b-1;i>f;){if(a[--i]0?(s=u,r=l):(o=-o,r=f),r.reverse();o--;r.push(0));r.reverse()}for(o=f.length,n=l.length,0>o-n&&(r=l,l=f,f=r,n=o),o=0;n;)o=(f[--n]=f[n]+l[n]+o)/b|0,f[n]=b===f[n]?0:f[n]%b;return o&&(f.unshift(o),++s),x(e,f,s)},M.precision=M.sd=function(e){var n,t,r=this,i=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(V&&I(13,"argument"+m,e),e!=!!e&&(e=null)),!i)return null;if(t=i.length-1,n=t*y+1,t=i[t]){for(;t%10==0;t/=10,n--);for(t=i[0];t>=10;t/=10,n++);}return e&&r.e+1>n&&(n=r.e+1),n},M.round=function(e,n){var t=new h(this);return(null==e||j(e,0,A,15))&&L(t,~~e+this.e+1,null!=n&&j(n,0,8,15,w)?0|n:q),t},M.shift=function(e){var n=this;return j(e,-O,O,16,"argument")?n.times("1e"+a(e)):new h(n.c&&n.c[0]&&(-O>e||e>O)?n.s*(0>e?0:1/0):n)},M.squareRoot=M.sqrt=function(){var e,n,i,o,u,s=this,f=s.c,l=s.s,c=s.e,a=P+4,g=new h("0.5");if(1!==l||!f||!f[0])return new h(!l||0>l&&(!f||f[0])?NaN:f?s:1/0);if(l=Math.sqrt(+s),0==l||l==1/0?(n=r(f),(n.length+c)%2==0&&(n+="0"),l=Math.sqrt(n),c=t((c+1)/2)-(0>c||c%2),l==1/0?n="1e"+c:(n=l.toExponential(),n=n.slice(0,n.indexOf("e")+1)+c),i=new h(n)):i=new h(l+""),i.c[0])for(c=i.e,l=c+a,3>l&&(l=0);;)if(u=i,i=g.times(u.plus(U(s,u,a,1))),r(u.c).slice(0,l)===(n=r(i.c)).slice(0,l)){if(i.el&&(m=O,O=R,R=m,o=l,l=g,g=o),o=l+g,m=[];o--;m.push(0));for(w=b,v=S,o=g;--o>=0;){for(r=0,p=R[o]%v,d=R[o]/v|0,s=l,u=o+s;u>o;)c=O[--s]%v,a=O[s]/v|0,f=d*c+a*p,c=p*c+f%v*v+m[u]+r,r=(c/w|0)+(f/v|0)+d*a,m[u--]=c%w;m[u]=r}return r?++i:m.shift(),x(e,m,i)},M.toDigits=function(e,n){var t=new h(this);return e=null!=e&&j(e,1,A,18,"precision")?0|e:null,n=null!=n&&j(n,0,8,18,w)?0|n:q,e?L(t,e,n):t},M.toExponential=function(e,n){return D(this,null!=e&&j(e,0,A,19)?~~e+1:null,n,19)},M.toFixed=function(e,n){return D(this,null!=e&&j(e,0,A,20)?~~e+this.e+1:null,n,20)},M.toFormat=function(e,n){var t=D(this,null!=e&&j(e,0,A,21)?~~e+this.e+1:null,n,21);if(this.c){var r,i=t.split("."),o=+X.groupSize,u=+X.secondaryGroupSize,s=X.groupSeparator,f=i[0],l=i[1],c=this.s<0,a=c?f.slice(1):f,h=a.length;if(u&&(r=o,o=u,u=r,h-=r),o>0&&h>0){for(r=h%o||o,f=a.substr(0,r);h>r;r+=o)f+=s+a.substr(r,o);u>0&&(f+=s+a.slice(r)),c&&(f="-"+f)}t=l?f+X.decimalSeparator+((u=+X.fractionGroupSize)?l.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+X.fractionGroupSeparator):l):f}return t},M.toFraction=function(e){var n,t,i,o,u,s,f,l,c,a=V,g=this,p=g.c,d=new h(T),m=t=new h(T),w=f=new h(T);if(null!=e&&(V=!1,s=new h(e),V=a,(!(a=s.isInt())||s.lt(T))&&(V&&I(22,"max denominator "+(a?"out of range":"not an integer"),e),e=!a&&s.c&&L(s,s.e+1,1).gte(T)?s:null)),!p)return g.toString();for(c=r(p),o=d.e=c.length-g.e-1,d.c[0]=R[(u=o%y)<0?y+u:u],e=!e||s.cmp(d)>0?o>0?d:m:s,u=z,z=1/0,s=new h(c),f.c[0]=0;l=U(s,d,0,1),i=t.plus(l.times(w)),1!=i.cmp(e);)t=w,w=i,m=f.plus(l.times(i=m)),f=i,d=s.minus(l.times(i=d)),s=i;return i=U(e.minus(t),w,0,1),f=f.plus(i.times(m)),t=t.plus(i.times(w)),f.s=m.s=g.s,o*=2,n=U(m,w,o,q).minus(g).abs().cmp(U(f,t,o,q).minus(g).abs())<1?[m.toString(),w.toString()]:[f.toString(),t.toString()],z=u,n},M.toNumber=function(){return+this},M.toPower=M.pow=function(e,n){var t,r,i,o=d(0>e?-e:+e),u=this;if(null!=n&&(C=23,n=new h(n)),!j(e,-O,O,23,"exponent")&&(!isFinite(e)||o>O&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return t=Math.pow(+u,e),new h(n?t%n:t);for(n?e>1&&u.gt(T)&&u.isInt()&&n.gt(T)&&n.isInt()?u=u.mod(n):(i=n,n=null):J&&(t=p(J/y+2)),r=new h(T);;){if(o%2){if(r=r.times(u),!r.c)break;t?r.c.length>t&&(r.c.length=t):n&&(r=r.mod(n))}if(o=d(o/2),!o)break;u=u.times(u),t?u.c&&u.c.length>t&&(u.c.length=t):n&&(u=u.mod(n))}return n?r:(0>e&&(r=T.div(r)),i?r.mod(i):t?L(r,J,q):r)},M.toPrecision=function(e,n){return D(this,null!=e&&j(e,1,A,24,"precision")?0|e:null,n,24)},M.toString=function(e){var n,t=this,i=t.s,o=t.e;return null===o?i?(n="Infinity",0>i&&(n="-"+n)):n="NaN":(n=r(t.c),n=null!=e&&j(e,2,64,25,"base")?E(c(n,o),0|e,10,i):k>=o||o>=$?l(n,o):c(n,o),0>i&&t.c[0]&&(n="-"+n)),n},M.truncated=M.trunc=function(){return L(new h(this),this.e+1,1)},M.valueOf=M.toJSON=function(){var e,n=this,t=n.e;return null===t?n.toString():(e=r(n.c),e=k>=t||t>=$?l(e,t):c(e,t),n.s<0?"-"+e:e)},null!=e&&h.config(e),h}function t(e){var n=0|e;return e>0||e===n?n:n-1}function r(e){for(var n,t,r=1,i=e.length,o=e[0]+"";i>r;){for(n=e[r++]+"",t=y-n.length;t--;n="0"+n);o+=n}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function i(e,n){var t,r,i=e.c,o=n.c,u=e.s,s=n.s,f=e.e,l=n.e;if(!u||!s)return null;if(t=i&&!i[0],r=o&&!o[0],t||r)return t?r?0:-s:u;if(u!=s)return u;if(t=0>u,r=f==l,!i||!o)return r?0:!i^t?1:-1;if(!r)return f>l^t?1:-1;for(s=(f=i.length)<(l=o.length)?f:l,u=0;s>u;u++)if(i[u]!=o[u])return i[u]>o[u]^t?1:-1;return f==l?0:f>l^t?1:-1}function o(e,n,t){return(e=a(e))>=n&&t>=e}function u(e){return"[object Array]"==Object.prototype.toString.call(e)}function s(e){return!(!e||!e.constructor||e.constructor.isBigNumber!==s)}function f(e,n,t){for(var r,i,o=[0],u=0,s=e.length;s>u;){for(i=o.length;i--;o[i]*=n);for(o[r=0]+=N.indexOf(e.charAt(u++));rt-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/t|0,o[r]%=t)}return o.reverse()}function l(e,n){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(0>n?"e":"e+")+n}function c(e,n){var t,r;if(0>n){for(r="0.";++n;r+="0");e=r+e}else if(t=e.length,++n>t){for(r="0",n-=t;--n;r+="0");e+=r}else t>n&&(e=e.slice(0,n)+"."+e.slice(n));return e}function a(e){return e=parseFloat(e),0>e?p(e):d(e)}var h,g=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,p=Math.ceil,d=Math.floor,m=" not a boolean or binary digit",w="rounding mode",v="number type has more than 15 significant digits",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",b=1e14,y=14,O=9007199254740991,R=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],S=1e7,A=1e9;h=n(),h["default"]=h.BigNumber=h,"function"==typeof define&&define.amd?define(function(){return h}):"undefined"!=typeof module&&module.exports?module.exports=h:(e||(e="undefined"!=typeof self?self:Function("return this")()),e.BigNumber=h)}(this); +//# sourceMappingURL=bignumber.js.map \ No newline at end of file diff --git a/Server File/node_modules/bignumber.js/bower.json b/Server File/node_modules/bignumber.js/bower.json new file mode 100644 index 0000000..a2d0a2a --- /dev/null +++ b/Server File/node_modules/bignumber.js/bower.json @@ -0,0 +1,36 @@ +{ + "name": "bignumber.js", + "main": "bignumber.js", + "version": "3.1.2", + "homepage": "https://github.com/MikeMcl/bignumber.js", + "authors": [ + "Michael Mclaughlin " + ], + "description": "A library for arbitrary-precision decimal and non-decimal arithmetic", + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "arbitrary", + "precision", + "arithmetic", + "big", + "number", + "decimal", + "float", + "biginteger", + "bigdecimal", + "bignumber", + "bigint", + "bignum" + ], + "license": "MIT", + "ignore": [ + ".*", + "*.json", + "test" + ] +} + diff --git a/Server File/node_modules/bignumber.js/doc/API.html b/Server File/node_modules/bignumber.js/doc/API.html new file mode 100644 index 0000000..5c6db1e --- /dev/null +++ b/Server File/node_modules/bignumber.js/doc/API.html @@ -0,0 +1,2198 @@ + + + + + + +bignumber.js API + + + + + + +
+ +

bignumber.js

+ +

A JavaScript library for arbitrary-precision arithmetic.

+

Hosted on GitHub.

+ +

API

+ +

+ See the README on GitHub for a + quick-start introduction. +

+

+ In all examples below, var and semicolons are not shown, and if a commented-out + value is in quotes it means toString has been called on the preceding expression. +

+ + +

CONSTRUCTOR

+ +
+ BigNumberBigNumber(value [, base]) ⇒ BigNumber +
+
+
value
+
+ number|string|BigNumber: see RANGE for + range. +
+
+ A numeric value. +
+
+ Legitimate values include ±0, ±Infinity and + NaN. +
+
+ Values of type number with more than 15 significant digits are + considered invalid (if ERRORS is true) as calling + toString or valueOf on + such numbers may not result in the intended value. +
console.log( 823456789123456.3 );    // 823456789123456.2
+
+
+ There is no limit to the number of digits of a value of type string (other than + that of JavaScript's maximum array size). +
+
+ Decimal string values may be in exponential, as well as normal (fixed-point) notation. + Non-decimal values must be in normal notation. +
+
+ String values in hexadecimal literal form, e.g. '0xff', are valid, as are + string values with the octal and binary prefixs '0o' and '0b'. + String values in octal literal form without the prefix will be interpreted as + decimals, e.g. '011' is interpreted as 11, not 9. +
+
Values in any base may have fraction digits.
+
+ For bases from 10 to 36, lower and/or upper case letters can be + used to represent values from 10 to 35. +
+
+ For bases above 36, a-z represents values from 10 to + 35, A-Z from 36 to 61, and + $ and _ represent 62 and 63 respectively + (this can be changed by editing the ALPHABET variable near the top of the + source file). +
+
+
+
base
+
+ number: integer, 2 to 64 inclusive +
+
The base of value.
+
+ If base is omitted, or is null or undefined, base + 10 is assumed. +
+
+
+

Returns a new instance of a BigNumber object.

+

+ If a base is specified, the value is rounded according to + the current DECIMAL_PLACES and + ROUNDING_MODE configuration. +

+

+ See Errors for the treatment of an invalid value or + base. +

+
+x = new BigNumber(9)                       // '9'
+y = new BigNumber(x)                       // '9'
+
+// 'new' is optional if ERRORS is false
+BigNumber(435.345)                         // '435.345'
+
+new BigNumber('5032485723458348569331745.33434346346912144534543')
+new BigNumber('4.321e+4')                  // '43210'
+new BigNumber('-735.0918e-430')            // '-7.350918e-428'
+new BigNumber(Infinity)                    // 'Infinity'
+new BigNumber(NaN)                         // 'NaN'
+new BigNumber('.5')                        // '0.5'
+new BigNumber('+2')                        // '2'
+new BigNumber(-10110100.1, 2)              // '-180.5'
+new BigNumber(-0b10110100.1)               // '-180.5'
+new BigNumber('123412421.234324', 5)       // '607236.557696'
+new BigNumber('ff.8', 16)                  // '255.5'
+new BigNumber('0xff.8')                    // '255.5'
+

+ The following throws 'not a base 2 number' if + ERRORS is true, otherwise it returns a BigNumber with value + NaN. +

+
new BigNumber(9, 2)
+

+ The following throws 'number type has more than 15 significant digits' if + ERRORS is true, otherwise it returns a BigNumber with value + 96517860459076820. +

+
new BigNumber(96517860459076817.4395)
+

+ The following throws 'not a number' if ERRORS + is true, otherwise it returns a BigNumber with value NaN. +

+
new BigNumber('blurgh')
+

+ A value is only rounded by the constructor if a base is specified. +

+
BigNumber.config({ DECIMAL_PLACES: 5 })
+new BigNumber(1.23456789)                  // '1.23456789'
+new BigNumber(1.23456789, 10)              // '1.23457'
+ + + +

Methods

+

The static methods of a BigNumber constructor.

+ + + + +
+ another.another([obj]) ⇒ BigNumber constructor +
+

obj: object

+

+ Returns a new independent BigNumber constructor with configuration as described by + obj (see config), or with the default + configuration if obj is null or undefined. +

+
BigNumber.config({ DECIMAL_PLACES: 5 })
+BN = BigNumber.another({ DECIMAL_PLACES: 9 })
+
+x = new BigNumber(1)
+y = new BN(1)
+
+x.div(3)                        // 0.33333
+y.div(3)                        // 0.333333333
+
+// BN = BigNumber.another({ DECIMAL_PLACES: 9 }) is equivalent to:
+BN = BigNumber.another()
+BN.config({ DECIMAL_PLACES: 9 })
+ + + +
configset([obj]) ⇒ object
+

+ obj: object: an object that contains some or all of the following + properties. +

+

Configures the settings for this particular BigNumber constructor.

+

Note: the configuration can also be supplied as an argument list, see below.

+
+
DECIMAL_PLACES
+
+ number: integer, 0 to 1e+9 inclusive
+ Default value: 20 +
+
+ The maximum number of decimal places of the results of operations involving + division, i.e. division, square root and base conversion operations, and power + operations with negative exponents.
+
+
+
BigNumber.config({ DECIMAL_PLACES: 5 })
+BigNumber.set({ DECIMAL_PLACES: 5 })    // equivalent
+BigNumber.config(5)    // equivalent
+
+ + + +
ROUNDING_MODE
+
+ number: integer, 0 to 8 inclusive
+ Default value: 4 (ROUND_HALF_UP) +
+
+ The rounding mode used in the above operations and the default rounding mode of + round, + toExponential, + toFixed, + toFormat and + toPrecision. +
+
The modes are available as enumerated properties of the BigNumber constructor.
+
+
BigNumber.config({ ROUNDING_MODE: 0 })
+BigNumber.config(null, BigNumber.ROUND_UP)    // equivalent
+
+ + + +
EXPONENTIAL_AT
+
+ number: integer, magnitude 0 to 1e+9 inclusive, or +
+ number[]: [ integer -1e+9 to 0 inclusive, integer + 0 to 1e+9 inclusive ]
+ Default value: [-7, 20] +
+
+ The exponent value(s) at which toString returns exponential notation. +
+
+ If a single number is assigned, the value is the exponent magnitude.
+ If an array of two numbers is assigned then the first number is the negative exponent + value at and beneath which exponential notation is used, and the second number is the + positive exponent value at and above which the same. +
+
+ For example, to emulate JavaScript numbers in terms of the exponent values at which they + begin to use exponential notation, use [-7, 20]. +
+
+
BigNumber.config({ EXPONENTIAL_AT: 2 })
+new BigNumber(12.3)         // '12.3'        e is only 1
+new BigNumber(123)          // '1.23e+2'
+new BigNumber(0.123)        // '0.123'       e is only -1
+new BigNumber(0.0123)       // '1.23e-2'
+
+BigNumber.config({ EXPONENTIAL_AT: [-7, 20] })
+new BigNumber(123456789)    // '123456789'   e is only 8
+new BigNumber(0.000000123)  // '1.23e-7'
+
+// Almost never return exponential notation:
+BigNumber.config({ EXPONENTIAL_AT: 1e+9 })
+
+// Always return exponential notation:
+BigNumber.config({ EXPONENTIAL_AT: 0 })
+
+
+ Regardless of the value of EXPONENTIAL_AT, the toFixed method + will always return a value in normal notation and the toExponential method + will always return a value in exponential form. +
+
+ Calling toString with a base argument, e.g. toString(10), will + also always return normal notation. +
+ + + +
RANGE
+
+ number: integer, magnitude 1 to 1e+9 inclusive, or +
+ number[]: [ integer -1e+9 to -1 inclusive, integer + 1 to 1e+9 inclusive ]
+ Default value: [-1e+9, 1e+9] +
+
+ The exponent value(s) beyond which overflow to Infinity and underflow to + zero occurs. +
+
+ If a single number is assigned, it is the maximum exponent magnitude: values wth a + positive exponent of greater magnitude become Infinity and those with a + negative exponent of greater magnitude become zero. +
+ If an array of two numbers is assigned then the first number is the negative exponent + limit and the second number is the positive exponent limit. +
+
+ For example, to emulate JavaScript numbers in terms of the exponent values at which they + become zero and Infinity, use [-324, 308]. +
+
+
BigNumber.config({ RANGE: 500 })
+BigNumber.config().RANGE     // [ -500, 500 ]
+new BigNumber('9.999e499')   // '9.999e+499'
+new BigNumber('1e500')       // 'Infinity'
+new BigNumber('1e-499')      // '1e-499'
+new BigNumber('1e-500')      // '0'
+
+BigNumber.config({ RANGE: [-3, 4] })
+new BigNumber(99999)         // '99999'      e is only 4
+new BigNumber(100000)        // 'Infinity'   e is 5
+new BigNumber(0.001)         // '0.01'       e is only -3
+new BigNumber(0.0001)        // '0'          e is -4
+
+
+ The largest possible magnitude of a finite BigNumber is + 9.999...e+1000000000.
+ The smallest possible magnitude of a non-zero BigNumber is 1e-1000000000. +
+ + + +
ERRORS
+
+ boolean|number: true, false, 0 or + 1.
+ Default value: true +
+
+ The value that determines whether BigNumber Errors are thrown.
+ If ERRORS is false, no errors will be thrown. +
+
See Errors.
+
BigNumber.config({ ERRORS: false })
+ + + +
CRYPTO
+
+ boolean|number: true, false, 0 or + 1.
+ Default value: false +
+
+ The value that determines whether cryptographically-secure pseudo-random number + generation is used. +
+
+ If CRYPTO is set to true then the + random method will generate random digits using + crypto.getRandomValues in browsers that support it, or + crypto.randomBytes if using a version of Node.js that supports it. +
+
+ If neither function is supported by the host environment then attempting to set + CRYPTO to true will fail, and if ERRORS + is true an exception will be thrown. +
+
+ If CRYPTO is false then the source of randomness used will be + Math.random (which is assumed to generate at least 30 bits of + randomness). +
+
See random.
+
+
BigNumber.config({ CRYPTO: true })
+BigNumber.config().CRYPTO       // true
+BigNumber.random()              // 0.54340758610486147524
+
+ + + +
MODULO_MODE
+
+ number: integer, 0 to 9 inclusive
+ Default value: 1 (ROUND_DOWN) +
+
The modulo mode used when calculating the modulus: a mod n.
+
+ The quotient, q = a / n, is calculated according to the + ROUNDING_MODE that corresponds to the chosen + MODULO_MODE. +
+
The remainder, r, is calculated as: r = a - n * q.
+
+ The modes that are most commonly used for the modulus/remainder operation are shown in + the following table. Although the other rounding modes can be used, they may not give + useful results. +
+
+ + + + + + + + + + + + + + + + + + + + + + +
PropertyValueDescription
ROUND_UP0 + The remainder is positive if the dividend is negative, otherwise it is negative. +
ROUND_DOWN1 + The remainder has the same sign as the dividend.
+ This uses 'truncating division' and matches the behaviour of JavaScript's + remainder operator %. +
ROUND_FLOOR3 + The remainder has the same sign as the divisor.
+ This matches Python's % operator. +
ROUND_HALF_EVEN6The IEEE 754 remainder function.
EUCLID9 + The remainder is always positive. Euclidian division:
+ q = sign(n) * floor(a / abs(n)) +
+
+
+ The rounding/modulo modes are available as enumerated properties of the BigNumber + constructor. +
+
See modulo.
+
+
BigNumber.config({ MODULO_MODE: BigNumber.EUCLID })
+BigNumber.config({ MODULO_MODE: 9 })          // equivalent
+
+ + + +
POW_PRECISION
+
+ number: integer, 0 to 1e+9 inclusive.
+ Default value: 0 +
+
+ The maximum number of significant digits of the result of the power operation + (unless a modulus is specified). +
+
If set to 0, the number of signifcant digits will not be limited.
+
See toPower.
+
BigNumber.config({ POW_PRECISION: 100 })
+ + + +
FORMAT
+
object
+
+ The FORMAT object configures the format of the string returned by the + toFormat method. +
+
+ The example below shows the properties of the FORMAT object that are + recognised, and their default values. +
+
+ Unlike the other configuration properties, the values of the properties of the + FORMAT object will not be checked for validity. The existing + FORMAT object will simply be replaced by the object that is passed in. + Note that all the properties shown below do not have to be included. +
+
See toFormat for examples of usage.
+
+
+BigNumber.config({
+    FORMAT: {
+        // the decimal separator
+        decimalSeparator: '.',
+        // the grouping separator of the integer part
+        groupSeparator: ',',
+        // the primary grouping size of the integer part
+        groupSize: 3,
+        // the secondary grouping size of the integer part
+        secondaryGroupSize: 0,
+        // the grouping separator of the fraction part
+        fractionGroupSeparator: ' ',
+        // the grouping size of the fraction part
+        fractionGroupSize: 0
+    }
+});
+
+
+
+

Returns an object with the above properties and their current values.

+

+ If the value to be assigned to any of the above properties is null or + undefined it is ignored. +

+

See Errors for the treatment of invalid values.

+
+BigNumber.config({
+    DECIMAL_PLACES: 40,
+    ROUNDING_MODE: BigNumber.ROUND_HALF_CEIL,
+    EXPONENTIAL_AT: [-10, 20],
+    RANGE: [-500, 500],
+    ERRORS: true,
+    CRYPTO: true,
+    MODULO_MODE: BigNumber.ROUND_FLOOR,
+    POW_PRECISION: 80,
+    FORMAT: {
+        groupSize: 3,
+        groupSeparator: ' ',
+        decimalSeparator: ','
+    }
+});
+
+// Alternatively but equivalently (excluding FORMAT):
+BigNumber.config( 40, 7, [-10, 20], 500, 1, 1, 3, 80 )
+
+obj = BigNumber.config();
+obj.ERRORS       // true
+obj.RANGE        // [-500, 500]
+ + + +
+ isBigNumber.isBigNumber(n) ⇒ boolean +
+

n: any

+

+ Returns true if n is a BigNumber instance, otherwise returns + false. +

+
+x = 42
+y = new BigNumber(x)
+BigNumber.isBigNumber(x)             // false
+BigNumber.isBigNumber(y)             // true
+
+BN = BigNumber.another();
+z = new BN(x)
+
+BigNumber.isBigNumber(z)             // true
+ + + +
+ max.max([arg1 [, arg2, ...]]) ⇒ BigNumber +
+

+ arg1, arg2, ...: number|string|BigNumber
+ See BigNumber for further parameter details. +

+

+ Returns a BigNumber whose value is the maximum of arg1, + arg2,... . +

+

The argument to this method can also be an array of values.

+

The return value is always exact and unrounded.

+
x = new BigNumber('3257869345.0378653')
+BigNumber.max(4e9, x, '123456789.9')          // '4000000000'
+
+arr = [12, '13', new BigNumber(14)]
+BigNumber.max(arr)                            // '14'
+ + + +
+ min.min([arg1 [, arg2, ...]]) ⇒ BigNumber +
+

+ arg1, arg2, ...: number|string|BigNumber
+ See BigNumber for further parameter details. +

+

+ Returns a BigNumber whose value is the minimum of arg1, + arg2,... . +

+

The argument to this method can also be an array of values.

+

The return value is always exact and unrounded.

+
x = new BigNumber('3257869345.0378653')
+BigNumber.min(4e9, x, '123456789.9')          // '123456789.9'
+
+arr = [2, new BigNumber(-14), '-15.9999', -12]
+BigNumber.min(arr)                            // '-15.9999'
+ + + +
+ random.random([dp]) ⇒ BigNumber +
+

dp: number: integer, 0 to 1e+9 inclusive

+

+ Returns a new BigNumber with a pseudo-random value equal to or greater than 0 and + less than 1. +

+

+ The return value will have dp decimal places (or less if trailing zeros are + produced).
+ If dp is omitted then the number of decimal places will default to the current + DECIMAL_PLACES setting. +

+

+ Depending on the value of this BigNumber constructor's + CRYPTO setting and the support for the + crypto object in the host environment, the random digits of the return value are + generated by either Math.random (fastest), crypto.getRandomValues + (Web Cryptography API in recent browsers) or crypto.randomBytes (Node.js). +

+

+ If CRYPTO is true, i.e. one of the + crypto methods is to be used, the value of a returned BigNumber should be + cryptographically-secure and statistically indistinguishable from a random value. +

+
BigNumber.config({ DECIMAL_PLACES: 10 })
+BigNumber.random()              // '0.4117936847'
+BigNumber.random(20)            // '0.78193327636914089009'
+ + + +

Properties

+

+ The library's enumerated rounding modes are stored as properties of the constructor.
+ (They are not referenced internally by the library itself.) +

+

+ Rounding modes 0 to 6 (inclusive) are the same as those of Java's + BigDecimal class. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyValueDescription
ROUND_UP0Rounds away from zero
ROUND_DOWN1Rounds towards zero
ROUND_CEIL2Rounds towards Infinity
ROUND_FLOOR3Rounds towards -Infinity
ROUND_HALF_UP4 + Rounds towards nearest neighbour.
+ If equidistant, rounds away from zero +
ROUND_HALF_DOWN5 + Rounds towards nearest neighbour.
+ If equidistant, rounds towards zero +
ROUND_HALF_EVEN6 + Rounds towards nearest neighbour.
+ If equidistant, rounds towards even neighbour +
ROUND_HALF_CEIL7 + Rounds towards nearest neighbour.
+ If equidistant, rounds towards Infinity +
ROUND_HALF_FLOOR8 + Rounds towards nearest neighbour.
+ If equidistant, rounds towards -Infinity +
+
+BigNumber.config({ ROUNDING_MODE: BigNumber.ROUND_CEIL })
+BigNumber.config({ ROUNDING_MODE: 2 })     // equivalent
+ + +

INSTANCE

+ +

Methods

+

The methods inherited by a BigNumber instance from its constructor's prototype object.

+

A BigNumber is immutable in the sense that it is not changed by its methods.

+

+ The treatment of ±0, ±Infinity and NaN is + consistent with how JavaScript treats these values. +

+

+ Many method names have a shorter alias.
+ (Internally, the library always uses the shorter method names.) +

+ + + +
absoluteValue.abs() ⇒ BigNumber
+

+ Returns a BigNumber whose value is the absolute value, i.e. the magnitude, of the value of + this BigNumber. +

+

The return value is always exact and unrounded.

+
+x = new BigNumber(-0.8)
+y = x.absoluteValue()           // '0.8'
+z = y.abs()                     // '0.8'
+ + + +
ceil.ceil() ⇒ BigNumber
+

+ Returns a BigNumber whose value is the value of this BigNumber rounded to + a whole number in the direction of positive Infinity. +

+
+x = new BigNumber(1.3)
+x.ceil()                        // '2'
+y = new BigNumber(-1.8)
+y.ceil()                        // '-1'
+ + + +
comparedTo.cmp(n [, base]) ⇒ number
+

+ n: number|string|BigNumber
+ base: number
+ See BigNumber for further parameter details. +

+ + + + + + + + + + + + + + + + + + +
Returns 
1If the value of this BigNumber is greater than the value of n
-1If the value of this BigNumber is less than the value of n
0If this BigNumber and n have the same value
nullIf the value of either this BigNumber or n is NaN
+
+x = new BigNumber(Infinity)
+y = new BigNumber(5)
+x.comparedTo(y)                 // 1
+x.comparedTo(x.minus(1))        // 0
+y.cmp(NaN)                      // null
+y.cmp('110', 2)                 // -1
+ + + +
decimalPlaces.dp() ⇒ number
+

+ Return the number of decimal places of the value of this BigNumber, or null if + the value of this BigNumber is ±Infinity or NaN. +

+
+x = new BigNumber(123.45)
+x.decimalPlaces()               // 2
+y = new BigNumber('9.9e-101')
+y.dp()                          // 102
+ + + +
dividedBy.div(n [, base]) ⇒ BigNumber +
+

+ n: number|string|BigNumber
+ base: number
+ See BigNumber for further parameter details. +

+

+ Returns a BigNumber whose value is the value of this BigNumber divided by + n, rounded according to the current + DECIMAL_PLACES and + ROUNDING_MODE configuration. +

+
+x = new BigNumber(355)
+y = new BigNumber(113)
+x.dividedBy(y)                  // '3.14159292035398230088'
+x.div(5)                        // '71'
+x.div(47, 16)                   // '5'
+ + + +
+ dividedToIntegerBy.divToInt(n [, base]) ⇒ + BigNumber +
+

+ n: number|string|BigNumber
+ base: number
+ See BigNumber for further parameter details. +

+

+ Return a BigNumber whose value is the integer part of dividing the value of this BigNumber by + n. +

+
+x = new BigNumber(5)
+y = new BigNumber(3)
+x.dividedToIntegerBy(y)         // '1'
+x.divToInt(0.7)                 // '7'
+x.divToInt('0.f', 16)           // '5'
+ + + +
equals.eq(n [, base]) ⇒ boolean
+

+ n: number|string|BigNumber
+ base: number
+ See BigNumber for further parameter details. +

+

+ Returns true if the value of this BigNumber equals the value of n, + otherwise returns false.
+ As with JavaScript, NaN does not equal NaN. +

+

Note: This method uses the comparedTo method internally.

+
+0 === 1e-324                    // true
+x = new BigNumber(0)
+x.equals('1e-324')              // false
+BigNumber(-0).eq(x)             // true  ( -0 === 0 )
+BigNumber(255).eq('ff', 16)     // true
+
+y = new BigNumber(NaN)
+y.equals(NaN)                   // false
+ + + +
floor.floor() ⇒ BigNumber
+

+ Returns a BigNumber whose value is the value of this BigNumber rounded to a whole number in + the direction of negative Infinity. +

+
+x = new BigNumber(1.8)
+x.floor()                       // '1'
+y = new BigNumber(-1.3)
+y.floor()                       // '-2'
+ + + +
greaterThan.gt(n [, base]) ⇒ boolean
+

+ n: number|string|BigNumber
+ base: number
+ See BigNumber for further parameter details. +

+

+ Returns true if the value of this BigNumber is greater than the value of + n, otherwise returns false. +

+

Note: This method uses the comparedTo method internally.

+
+0.1 > (0.3 - 0.2)                           // true
+x = new BigNumber(0.1)
+x.greaterThan(BigNumber(0.3).minus(0.2))    // false
+BigNumber(0).gt(x)                          // false
+BigNumber(11, 3).gt(11.1, 2)                // true
+ + + +
+ greaterThanOrEqualTo.gte(n [, base]) ⇒ boolean +
+

+ n: number|string|BigNumber
+ base: number
+ See BigNumber for further parameter details. +

+

+ Returns true if the value of this BigNumber is greater than or equal to the value + of n, otherwise returns false. +

+

Note: This method uses the comparedTo method internally.

+
+(0.3 - 0.2) >= 0.1                   // false
+x = new BigNumber(0.3).minus(0.2)
+x.greaterThanOrEqualTo(0.1)          // true
+BigNumber(1).gte(x)                  // true
+BigNumber(10, 18).gte('i', 36)       // true
+ + + +
isFinite.isFinite() ⇒ boolean
+

+ Returns true if the value of this BigNumber is a finite number, otherwise + returns false. +

+

+ The only possible non-finite values of a BigNumber are NaN, Infinity + and -Infinity. +

+
+x = new BigNumber(1)
+x.isFinite()                    // true
+y = new BigNumber(Infinity)
+y.isFinite()                    // false
+

+ Note: The native method isFinite() can be used if + n <= Number.MAX_VALUE. +

+ + + +
isInteger.isInt() ⇒ boolean
+

+ Returns true if the value of this BigNumber is a whole number, otherwise returns + false. +

+
+x = new BigNumber(1)
+x.isInteger()                   // true
+y = new BigNumber(123.456)
+y.isInt()                       // false
+ + + +
isNaN.isNaN() ⇒ boolean
+

+ Returns true if the value of this BigNumber is NaN, otherwise + returns false. +

+
+x = new BigNumber(NaN)
+x.isNaN()                       // true
+y = new BigNumber('Infinity')
+y.isNaN()                       // false
+

Note: The native method isNaN() can also be used.

+ + + +
isNegative.isNeg() ⇒ boolean
+

+ Returns true if the value of this BigNumber is negative, otherwise returns + false. +

+
+x = new BigNumber(-0)
+x.isNegative()                  // true
+y = new BigNumber(2)
+y.isNeg()                       // false
+

Note: n < 0 can be used if n <= -Number.MIN_VALUE.

+ + + +
isZero.isZero() ⇒ boolean
+

+ Returns true if the value of this BigNumber is zero or minus zero, otherwise + returns false. +

+
+x = new BigNumber(-0)
+x.isZero() && x.isNeg()         // true
+y = new BigNumber(Infinity)
+y.isZero()                      // false
+

Note: n == 0 can be used if n >= Number.MIN_VALUE.

+ + + +
lessThan.lt(n [, base]) ⇒ boolean
+

+ n: number|string|BigNumber
+ base: number
+ See BigNumber for further parameter details. +

+

+ Returns true if the value of this BigNumber is less than the value of + n, otherwise returns false. +

+

Note: This method uses the comparedTo method internally.

+
+(0.3 - 0.2) < 0.1                     // true
+x = new BigNumber(0.3).minus(0.2)
+x.lessThan(0.1)                       // false
+BigNumber(0).lt(x)                    // true
+BigNumber(11.1, 2).lt(11, 3)          // true
+ + + +
+ lessThanOrEqualTo.lte(n [, base]) ⇒ boolean +
+

+ n: number|string|BigNumber
+ base: number
+ See BigNumber for further parameter details. +

+

+ Returns true if the value of this BigNumber is less than or equal to the value of + n, otherwise returns false. +

+

Note: This method uses the comparedTo method internally.

+
+0.1 <= (0.3 - 0.2)                                // false
+x = new BigNumber(0.1)
+x.lessThanOrEqualTo(BigNumber(0.3).minus(0.2))    // true
+BigNumber(-1).lte(x)                              // true
+BigNumber(10, 18).lte('i', 36)                    // true
+ + + +
+ minus.minus(n [, base]) ⇒ BigNumber +
+

+ n: number|string|BigNumber
+ base: number
+ See BigNumber for further parameter details. +

+

Returns a BigNumber whose value is the value of this BigNumber minus n.

+

The return value is always exact and unrounded.

+
+0.3 - 0.1                       // 0.19999999999999998
+x = new BigNumber(0.3)
+x.minus(0.1)                    // '0.2'
+x.minus(0.6, 20)                // '0'
+ + + +
modulo.mod(n [, base]) ⇒ BigNumber
+

+ n: number|string|BigNumber
+ base: number
+ See BigNumber for further parameter details. +

+

+ Returns a BigNumber whose value is the value of this BigNumber modulo n, i.e. + the integer remainder of dividing this BigNumber by n. +

+

+ The value returned, and in particular its sign, is dependent on the value of the + MODULO_MODE setting of this BigNumber constructor. + If it is 1 (default value), the result will have the same sign as this BigNumber, + and it will match that of Javascript's % operator (within the limits of double + precision) and BigDecimal's remainder method. +

+

The return value is always exact and unrounded.

+

+ See MODULO_MODE for a description of the other + modulo modes. +

+
+1 % 0.9                         // 0.09999999999999998
+x = new BigNumber(1)
+x.modulo(0.9)                   // '0.1'
+y = new BigNumber(33)
+y.mod('a', 33)                  // '3'
+ + + +
negated.neg() ⇒ BigNumber
+

+ Returns a BigNumber whose value is the value of this BigNumber negated, i.e. multiplied by + -1. +

+
+x = new BigNumber(1.8)
+x.negated()                     // '-1.8'
+y = new BigNumber(-1.3)
+y.neg()                         // '1.3'
+ + + +
plus.plus(n [, base]) ⇒ BigNumber
+

+ n: number|string|BigNumber
+ base: number
+ See BigNumber for further parameter details. +

+

Returns a BigNumber whose value is the value of this BigNumber plus n.

+

The return value is always exact and unrounded.

+
+0.1 + 0.2                       // 0.30000000000000004
+x = new BigNumber(0.1)
+y = x.plus(0.2)                 // '0.3'
+BigNumber(0.7).plus(x).plus(y)  // '1'
+x.plus('0.1', 8)                // '0.225'
+ + + +
precision.sd([z]) ⇒ number
+

+ z: boolean|number: true, false, 0 + or 1 +

+

Returns the number of significant digits of the value of this BigNumber.

+

+ If z is true or 1 then any trailing zeros of the + integer part of a number are counted as significant digits, otherwise they are not. +

+
+x = new BigNumber(1.234)
+x.precision()                   // 4
+y = new BigNumber(987000)
+y.sd()                          // 3
+y.sd(true)                      // 6
+ + + +
round.round([dp [, rm]]) ⇒ BigNumber
+

+ dp: number: integer, 0 to 1e+9 inclusive
+ rm: number: integer, 0 to 8 inclusive +

+

+ Returns a BigNumber whose value is the value of this BigNumber rounded by rounding mode + rm to a maximum of dp decimal places. +

+

+ if dp is omitted, or is null or undefined, the + return value is n rounded to a whole number.
+ if rm is omitted, or is null or undefined, + ROUNDING_MODE is used. +

+

+ See Errors for the treatment of other non-integer or out of range + dp or rm values. +

+
+x = 1234.56
+Math.round(x)                             // 1235
+
+y = new BigNumber(x)
+y.round()                                 // '1235'
+y.round(1)                                // '1234.6'
+y.round(2)                                // '1234.56'
+y.round(10)                               // '1234.56'
+y.round(0, 1)                             // '1234'
+y.round(0, 6)                             // '1235'
+y.round(1, 1)                             // '1234.5'
+y.round(1, BigNumber.ROUND_HALF_EVEN)     // '1234.6'
+y                                         // '1234.56'
+ + + +
shift.shift(n) ⇒ BigNumber
+

+ n: number: integer, + -9007199254740991 to 9007199254740991 inclusive +

+

+ Returns a BigNumber whose value is the value of this BigNumber shifted n places. +

+ The shift is of the decimal point, i.e. of powers of ten, and is to the left if n + is negative or to the right if n is positive. +

+

The return value is always exact and unrounded.

+
+x = new BigNumber(1.23)
+x.shift(3)                      // '1230'
+x.shift(-3)                     // '0.00123'
+ + + +
squareRoot.sqrt() ⇒ BigNumber
+

+ Returns a BigNumber whose value is the square root of the value of this BigNumber, + rounded according to the current + DECIMAL_PLACES and + ROUNDING_MODE configuration. +

+

+ The return value will be correctly rounded, i.e. rounded as if the result was first calculated + to an infinite number of correct digits before rounding. +

+
+x = new BigNumber(16)
+x.squareRoot()                  // '4'
+y = new BigNumber(3)
+y.sqrt()                        // '1.73205080756887729353'
+ + + +
times.times(n [, base]) ⇒ BigNumber
+

+ n: number|string|BigNumber
+ base: number
+ See BigNumber for further parameter details. +

+

Returns a BigNumber whose value is the value of this BigNumber times n.

+

The return value is always exact and unrounded.

+
+0.6 * 3                         // 1.7999999999999998
+x = new BigNumber(0.6)
+y = x.times(3)                  // '1.8'
+BigNumber('7e+500').times(y)    // '1.26e+501'
+x.times('-a', 16)               // '-6'
+ + + +
+ toDigits.toDigits([sd [, rm]]) ⇒ BigNumber +
+

+ sd: number: integer, 1 to 1e+9 inclusive.
+ rm: number: integer, 0 to 8 inclusive. +

+

+ Returns a BigNumber whose value is the value of this BigNumber rounded to sd + significant digits using rounding mode rm. +

+

+ If sd is omitted or is null or undefined, the return + value will not be rounded.
+ If rm is omitted or is null or undefined, + ROUNDING_MODE will be used. +

+

+ See Errors for the treatment of other non-integer or out of range + sd or rm values. +

+
+BigNumber.config({ precision: 5, rounding: 4 })
+x = new BigNumber(9876.54321)
+
+x.toDigits()                          // '9876.5'
+x.toDigits(6)                         // '9876.54'
+x.toDigits(6, BigNumber.ROUND_UP)     // '9876.55'
+x.toDigits(2)                         // '9900'
+x.toDigits(2, 1)                      // '9800'
+x                                     // '9876.54321'
+ + + +
+ toExponential.toExponential([dp [, rm]]) ⇒ string +
+

+ dp: number: integer, 0 to 1e+9 inclusive
+ rm: number: integer, 0 to 8 inclusive +

+

+ Returns a string representing the value of this BigNumber in exponential notation rounded + using rounding mode rm to dp decimal places, i.e with one digit + before the decimal point and dp digits after it. +

+

+ If the value of this BigNumber in exponential notation has fewer than dp fraction + digits, the return value will be appended with zeros accordingly. +

+

+ If dp is omitted, or is null or undefined, the number + of digits after the decimal point defaults to the minimum number of digits necessary to + represent the value exactly.
+ If rm is omitted or is null or undefined, + ROUNDING_MODE is used. +

+

+ See Errors for the treatment of other non-integer or out of range + dp or rm values. +

+
+x = 45.6
+y = new BigNumber(x)
+x.toExponential()               // '4.56e+1'
+y.toExponential()               // '4.56e+1'
+x.toExponential(0)              // '5e+1'
+y.toExponential(0)              // '5e+1'
+x.toExponential(1)              // '4.6e+1'
+y.toExponential(1)              // '4.6e+1'
+y.toExponential(1, 1)           // '4.5e+1'  (ROUND_DOWN)
+x.toExponential(3)              // '4.560e+1'
+y.toExponential(3)              // '4.560e+1'
+ + + +
+ toFixed.toFixed([dp [, rm]]) ⇒ string +
+

+ dp: number: integer, 0 to 1e+9 inclusive
+ rm: number: integer, 0 to 8 inclusive +

+

+ Returns a string representing the value of this BigNumber in normal (fixed-point) notation + rounded to dp decimal places using rounding mode rm. +

+

+ If the value of this BigNumber in normal notation has fewer than dp fraction + digits, the return value will be appended with zeros accordingly. +

+

+ Unlike Number.prototype.toFixed, which returns exponential notation if a number + is greater or equal to 1021, this method will always return normal + notation. +

+

+ If dp is omitted or is null or undefined, the return + value will be unrounded and in normal notation. This is also unlike + Number.prototype.toFixed, which returns the value to zero decimal places.
+ It is useful when fixed-point notation is required and the current + EXPONENTIAL_AT setting causes + toString to return exponential notation.
+ If rm is omitted or is null or undefined, + ROUNDING_MODE is used. +

+

+ See Errors for the treatment of other non-integer or out of range + dp or rm values. +

+
+x = 3.456
+y = new BigNumber(x)
+x.toFixed()                     // '3'
+y.toFixed()                     // '3.456'
+y.toFixed(0)                    // '3'
+x.toFixed(2)                    // '3.46'
+y.toFixed(2)                    // '3.46'
+y.toFixed(2, 1)                 // '3.45'  (ROUND_DOWN)
+x.toFixed(5)                    // '3.45600'
+y.toFixed(5)                    // '3.45600'
+ + + +
+ toFormat.toFormat([dp [, rm]]) ⇒ string +
+

+ dp: number: integer, 0 to 1e+9 inclusive
+ rm: number: integer, 0 to 8 inclusive +

+

+

+ Returns a string representing the value of this BigNumber in normal (fixed-point) notation + rounded to dp decimal places using rounding mode rm, and formatted + according to the properties of the FORMAT object. +

+

+ See the examples below for the properties of the + FORMAT object, their types and their usage. +

+

+ If dp is omitted or is null or undefined, then the + return value is not rounded to a fixed number of decimal places.
+ If rm is omitted or is null or undefined, + ROUNDING_MODE is used. +

+

+ See Errors for the treatment of other non-integer or out of range + dp or rm values. +

+
+format = {
+    decimalSeparator: '.',
+    groupSeparator: ',',
+    groupSize: 3,
+    secondaryGroupSize: 0,
+    fractionGroupSeparator: ' ',
+    fractionGroupSize: 0
+}
+BigNumber.config({ FORMAT: format })
+
+x = new BigNumber('123456789.123456789')
+x.toFormat()                    // '123,456,789.123456789'
+x.toFormat(1)                   // '123,456,789.1'
+
+// If a reference to the object assigned to FORMAT has been retained,
+// the format properties can be changed directly
+format.groupSeparator = ' '
+format.fractionGroupSize = 5
+x.toFormat()                    // '123 456 789.12345 6789'
+
+BigNumber.config({
+    FORMAT: {
+        decimalSeparator = ',',
+        groupSeparator = '.',
+        groupSize = 3,
+        secondaryGroupSize = 2
+    }
+})
+
+x.toFormat(6)                   // '12.34.56.789,123'
+ + + +
+ toFraction.toFraction([max]) ⇒ [string, string] +
+

+ max: number|string|BigNumber: integer >= 1 and < + Infinity +

+

+ Returns a string array representing the value of this BigNumber as a simple fraction with an + integer numerator and an integer denominator. The denominator will be a positive non-zero + value less than or equal to max. +

+

+ If a maximum denominator, max, is not specified, or is null or + undefined, the denominator will be the lowest value necessary to represent the + number exactly. +

+

+ See Errors for the treatment of other non-integer or out of range + max values. +

+
+x = new BigNumber(1.75)
+x.toFraction()                  // '7, 4'
+
+pi = new BigNumber('3.14159265358')
+pi.toFraction()                 // '157079632679,50000000000'
+pi.toFraction(100000)           // '312689, 99532'
+pi.toFraction(10000)            // '355, 113'
+pi.toFraction(100)              // '311, 99'
+pi.toFraction(10)               // '22, 7'
+pi.toFraction(1)                // '3, 1'
+ + + +
toJSON.toJSON() ⇒ string
+

As valueOf.

+
+x = new BigNumber('177.7e+457')
+y = new BigNumber(235.4325)
+z = new BigNumber('0.0098074')
+
+// Serialize an array of three BigNumbers
+str = JSON.stringify( [x, y, z] )
+// "["1.777e+459","235.4325","0.0098074"]"
+
+// Return an array of three BigNumbers
+JSON.parse(str, function (key, val) {
+    return key === '' ? val : new BigNumber(val)
+})
+ + + +
toNumber.toNumber() ⇒ number
+

Returns the value of this BigNumber as a JavaScript number primitive.

+

+ Type coercion with, for example, the unary plus operator will also work, except that a + BigNumber with the value minus zero will be converted to positive zero. +

+
+x = new BigNumber(456.789)
+x.toNumber()                    // 456.789
++x                              // 456.789
+
+y = new BigNumber('45987349857634085409857349856430985')
+y.toNumber()                    // 4.598734985763409e+34
+
+z = new BigNumber(-0)
+1 / +z                          // Infinity
+1 / z.toNumber()                // -Infinity
+ + + +
toPower.pow(n [, m]) ⇒ BigNumber
+

+ n: number: integer, + -9007199254740991 to 9007199254740991 inclusive
+ m: number|string|BigNumber +

+

+ Returns a BigNumber whose value is the value of this BigNumber raised to the power + n, and optionally modulo a modulus m. +

+

+ If n is negative the result is rounded according to the current + DECIMAL_PLACES and + ROUNDING_MODE configuration. +

+

+ If n is not an integer or is out of range: +

+

+ If ERRORS is true a BigNumber Error is thrown,
+ else if n is greater than 9007199254740991, it is interpreted as + Infinity;
+ else if n is less than -9007199254740991, it is interpreted as + -Infinity;
+ else if n is otherwise a number, it is truncated to an integer;
+ else it is interpreted as NaN. +

+

+ As the number of digits of the result of the power operation can grow so large so quickly, + e.g. 123.45610000 has over 50000 digits, the number of significant + digits calculated is limited to the value of the + POW_PRECISION setting (unless a modulus + m is specified). +

+

+ By default POW_PRECISION is set to 0. + This means that an unlimited number of significant digits will be calculated, and that the + method's performance will decrease dramatically for larger exponents. +

+

+ Negative exponents will be calculated to the number of decimal places specified by + DECIMAL_PLACES (but not to more than + POW_PRECISION significant digits). +

+

+ If m is specified and the value of m, n and this + BigNumber are positive integers, then a fast modular exponentiation algorithm is used, + otherwise if any of the values is not a positive integer the operation will simply be + performed as x.toPower(n).modulo(m) with a + POW_PRECISION of 0. +

+
+Math.pow(0.7, 2)                // 0.48999999999999994
+x = new BigNumber(0.7)
+x.toPower(2)                    // '0.49'
+BigNumber(3).pow(-2)            // '0.11111111111111111111'
+ + + +
+ toPrecision.toPrecision([sd [, rm]]) ⇒ string +
+

+ sd: number: integer, 1 to 1e+9 inclusive
+ rm: number: integer, 0 to 8 inclusive +

+

+ Returns a string representing the value of this BigNumber rounded to sd + significant digits using rounding mode rm. +

+

+ If sd is less than the number of digits necessary to represent the integer part + of the value in normal (fixed-point) notation, then exponential notation is used. +

+

+ If sd is omitted, or is null or undefined, then the + return value is the same as n.toString().
+ If rm is omitted or is null or undefined, + ROUNDING_MODE is used. +

+

+ See Errors for the treatment of other non-integer or out of range + sd or rm values. +

+
+x = 45.6
+y = new BigNumber(x)
+x.toPrecision()                 // '45.6'
+y.toPrecision()                 // '45.6'
+x.toPrecision(1)                // '5e+1'
+y.toPrecision(1)                // '5e+1'
+y.toPrecision(2, 0)             // '4.6e+1'  (ROUND_UP)
+y.toPrecision(2, 1)             // '4.5e+1'  (ROUND_DOWN)
+x.toPrecision(5)                // '45.600'
+y.toPrecision(5)                // '45.600'
+ + + +
toString.toString([base]) ⇒ string
+

base: number: integer, 2 to 64 inclusive

+

+ Returns a string representing the value of this BigNumber in the specified base, or base + 10 if base is omitted or is null or + undefined. +

+

+ For bases above 10, values from 10 to 35 are + represented by a-z (as with Number.prototype.toString), + 36 to 61 by A-Z, and 62 and + 63 by $ and _ respectively. +

+

+ If a base is specified the value is rounded according to the current + DECIMAL_PLACES + and ROUNDING_MODE configuration. +

+

+ If a base is not specified, and this BigNumber has a positive + exponent that is equal to or greater than the positive component of the + current EXPONENTIAL_AT setting, + or a negative exponent equal to or less than the negative component of the + setting, then exponential notation is returned. +

+

If base is null or undefined it is ignored.

+

+ See Errors for the treatment of other non-integer or out of range + base values. +

+
+x = new BigNumber(750000)
+x.toString()                    // '750000'
+BigNumber.config({ EXPONENTIAL_AT: 5 })
+x.toString()                    // '7.5e+5'
+
+y = new BigNumber(362.875)
+y.toString(2)                   // '101101010.111'
+y.toString(9)                   // '442.77777777777777777778'
+y.toString(32)                  // 'ba.s'
+
+BigNumber.config({ DECIMAL_PLACES: 4 });
+z = new BigNumber('1.23456789')
+z.toString()                    // '1.23456789'
+z.toString(10)                  // '1.2346'
+ + + +
truncated.trunc() ⇒ BigNumber
+

+ Returns a BigNumber whose value is the value of this BigNumber truncated to a whole number. +

+
+x = new BigNumber(123.456)
+x.truncated()                   // '123'
+y = new BigNumber(-12.3)
+y.trunc()                       // '-12'
+ + + +
valueOf.valueOf() ⇒ string
+

+ As toString, but does not accept a base argument and includes the minus sign + for negative zero. +

+
+x = new BigNumber('-0')
+x.toString()                    // '0'
+x.valueOf()                     // '-0'
+y = new BigNumber('1.777e+457')
+y.valueOf()                     // '1.777e+457'
+ + + +

Properties

+

A BigNumber is an object with three properties:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyDescriptionTypeValue
ccoefficient*number[] Array of base 1e14 numbers
eexponentnumberInteger, -1000000000 to 1000000000 inclusive
ssignnumber-1 or 1
+

*significand

+

The value of any of the three properties may also be null.

+

+ From v2.0.0 of this library, the value of the coefficient of a BigNumber is stored in a + normalised base 100000000000000 floating point format, as opposed to the base + 10 format used in v1.x.x +

+

+ This change means the properties of a BigNumber are now best considered to be read-only. + Previously it was acceptable to change the exponent of a BigNumber by writing to its exponent + property directly, but this is no longer recommended as the number of digits in the first + element of the coefficient array is dependent on the exponent, so the coefficient would also + need to be altered. +

+

+ Note that, as with JavaScript numbers, the original exponent and fractional trailing zeros are + not necessarily preserved. +

+
x = new BigNumber(0.123)              // '0.123'
+x.toExponential()                     // '1.23e-1'
+x.c                                   // '1,2,3'
+x.e                                   // -1
+x.s                                   // 1
+
+y = new Number(-123.4567000e+2)       // '-12345.67'
+y.toExponential()                     // '-1.234567e+4'
+z = new BigNumber('-123.4567000e+2')  // '-12345.67'
+z.toExponential()                     // '-1.234567e+4'
+z.c                                   // '1,2,3,4,5,6,7'
+z.e                                   // 4
+z.s                                   // -1
+ + + +

Zero, NaN and Infinity

+

+ The table below shows how ±0, NaN and + ±Infinity are stored. +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ces
±0[0]0±1
NaNnullnullnull
±Infinitynullnull±1
+
+x = new Number(-0)              // 0
+1 / x == -Infinity              // true
+
+y = new BigNumber(-0)           // '0'
+y.c                             // '0' ( [0].toString() )
+y.e                             // 0
+y.s                             // -1
+ + + +

Errors

+

+ The errors that are thrown are generic Error objects with name + BigNumber Error. +

+

+ The table below shows the errors that may be thrown if ERRORS is + true, and the action taken if ERRORS is false. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method(s)ERRORS: true
Throw BigNumber Error
ERRORS: false
Action on invalid argument
+ + BigNumber
+ comparedTo
+ dividedBy
+ dividedToIntegerBy
+ equals
+ greaterThan
+ greaterThanOrEqualTo
+ lessThan
+ lessThanOrEqualTo
+ minus
+ modulo
+ plus
+ times +
number type has more than
15 significant digits
Accept.
not a base... numberSubstitute NaN.
base not an integerTruncate to integer.
Ignore if not a number.
base out of rangeIgnore.
not a number*Substitute NaN.
anothernot an objectIgnore.
configDECIMAL_PLACES not an integerTruncate to integer.
Ignore if not a number.
DECIMAL_PLACES out of rangeIgnore.
ROUNDING_MODE not an integerTruncate to integer.
Ignore if not a number.
ROUNDING_MODE out of rangeIgnore.
EXPONENTIAL_AT not an integer
or not [integer, integer]
Truncate to integer(s).
Ignore if not number(s).
EXPONENTIAL_AT out of range
or not [negative, positive]
Ignore.
RANGE not an integer
or not [integer, integer]
Truncate to integer(s).
Ignore if not number(s).
RANGE cannot be zeroIgnore.
RANGE out of range
or not [negative, positive]
Ignore.
ERRORS not a boolean
or binary digit
Ignore.
CRYPTO not a boolean
or binary digit
Ignore.
CRYPTO crypto unavailableIgnore.
MODULO_MODE not an integerTruncate to integer.
Ignore if not a number.
MODULO_MODE out of rangeIgnore.
POW_PRECISION not an integerTruncate to integer.
Ignore if not a number.
POW_PRECISION out of rangeIgnore.
FORMAT not an objectIgnore.
precisionargument not a boolean
or binary digit
Ignore.
rounddecimal places not an integerTruncate to integer.
Ignore if not a number.
decimal places out of rangeIgnore.
rounding mode not an integerTruncate to integer.
Ignore if not a number.
rounding mode out of rangeIgnore.
shiftargument not an integerTruncate to integer.
Ignore if not a number.
argument out of rangeSubstitute ±Infinity. +
+ toExponential
+ toFixed
+ toFormat +
decimal places not an integerTruncate to integer.
Ignore if not a number.
decimal places out of rangeIgnore.
rounding mode not an integerTruncate to integer.
Ignore if not a number.
rounding mode out of rangeIgnore.
toFractionmax denominator not an integerTruncate to integer.
Ignore if not a number.
max denominator out of rangeIgnore.
+ toDigits
+ toPrecision +
precision not an integerTruncate to integer.
Ignore if not a number.
precision out of rangeIgnore.
rounding mode not an integerTruncate to integer.
Ignore if not a number.
rounding mode out of rangeIgnore.
toPowerexponent not an integerTruncate to integer.
Substitute NaN if not a number.
exponent out of rangeSubstitute ±Infinity. +
toStringbase not an integerTruncate to integer.
Ignore if not a number.
base out of rangeIgnore.
+

*No error is thrown if the value is NaN or 'NaN'.

+

+ The message of a BigNumber Error will also contain the name of the method from which + the error originated. +

+

To determine if an exception is a BigNumber Error:

+
+try {
+    // ...
+} catch (e) {
+    if ( e instanceof Error && e.name == 'BigNumber Error' ) {
+        // ...
+    }
+}
+ + + +

FAQ

+ +
Why are trailing fractional zeros removed from BigNumbers?
+

+ Some arbitrary-precision libraries retain trailing fractional zeros as they can indicate the + precision of a value. This can be useful but the results of arithmetic operations can be + misleading. +

+
+x = new BigDecimal("1.0")
+y = new BigDecimal("1.1000")
+z = x.add(y)                      // 2.1000
+
+x = new BigDecimal("1.20")
+y = new BigDecimal("3.45000")
+z = x.multiply(y)                 // 4.1400000
+

+ To specify the precision of a value is to specify that the value lies + within a certain range. +

+

+ In the first example, x has a value of 1.0. The trailing zero shows + the precision of the value, implying that it is in the range 0.95 to + 1.05. Similarly, the precision indicated by the trailing zeros of y + indicates that the value is in the range 1.09995 to 1.10005. +

+

+ If we add the two lowest values in the ranges we have, 0.95 + 1.09995 = 2.04995, + and if we add the two highest values we have, 1.05 + 1.10005 = 2.15005, so the + range of the result of the addition implied by the precision of its operands is + 2.04995 to 2.15005. +

+

+ The result given by BigDecimal of 2.1000 however, indicates that the value is in + the range 2.09995 to 2.10005 and therefore the precision implied by + its trailing zeros may be misleading. +

+

+ In the second example, the true range is 4.122744 to 4.157256 yet + the BigDecimal answer of 4.1400000 indicates a range of 4.13999995 + to 4.14000005. Again, the precision implied by the trailing zeros may be + misleading. +

+

+ This library, like binary floating point and most calculators, does not retain trailing + fractional zeros. Instead, the toExponential, toFixed and + toPrecision methods enable trailing zeros to be added if and when required.
+

+
+ + + diff --git a/Server File/node_modules/bignumber.js/package.json b/Server File/node_modules/bignumber.js/package.json new file mode 100644 index 0000000..0f8c6d0 --- /dev/null +++ b/Server File/node_modules/bignumber.js/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "bignumber.js@3.1.2", + "scope": null, + "escapedName": "bignumber.js", + "name": "bignumber.js", + "rawSpec": "3.1.2", + "spec": "3.1.2", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\mysql" + ] + ], + "_from": "bignumber.js@3.1.2", + "_id": "bignumber.js@3.1.2", + "_inCache": true, + "_location": "/bignumber.js", + "_nodeVersion": "7.2.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/bignumber.js-3.1.2.tgz_1483896554937_0.13670875830575824" + }, + "_npmUser": { + "name": "mikemcl", + "email": "M8ch88l@gmail.com" + }, + "_npmVersion": "3.8.1", + "_phantomChildren": {}, + "_requested": { + "raw": "bignumber.js@3.1.2", + "scope": null, + "escapedName": "bignumber.js", + "name": "bignumber.js", + "rawSpec": "3.1.2", + "spec": "3.1.2", + "type": "version" + }, + "_requiredBy": [ + "/mysql" + ], + "_resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-3.1.2.tgz", + "_shasum": "f3bdb99ad5268a15fc1f0bed2fb018e2693fe236", + "_shrinkwrap": null, + "_spec": "bignumber.js@3.1.2", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\mysql", + "author": { + "name": "Michael Mclaughlin", + "email": "M8ch88l@gmail.com" + }, + "bugs": { + "url": "https://github.com/MikeMcl/bignumber.js/issues" + }, + "dependencies": {}, + "description": "A library for arbitrary-precision decimal and non-decimal arithmetic", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "f3bdb99ad5268a15fc1f0bed2fb018e2693fe236", + "tarball": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-3.1.2.tgz" + }, + "engines": { + "node": "*" + }, + "gitHead": "2ccc3a7d2831fbd849fe1efbd9895c814bb344ff", + "homepage": "https://github.com/MikeMcl/bignumber.js#readme", + "keywords": [ + "arbitrary", + "precision", + "arithmetic", + "big", + "number", + "decimal", + "float", + "biginteger", + "bigdecimal", + "bignumber", + "bigint", + "bignum" + ], + "license": "MIT", + "main": "bignumber.js", + "maintainers": [ + { + "name": "mikemcl", + "email": "M8ch88l@gmail.com" + } + ], + "name": "bignumber.js", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/MikeMcl/bignumber.js.git" + }, + "scripts": { + "build": "uglifyjs bignumber.js --source-map bignumber.js.map -c -m -o bignumber.min.js --preamble \"/* bignumber.js v3.1.2 https://github.com/MikeMcl/bignumber.js/LICENCE */\"", + "test": "node ./test/every-test.js" + }, + "version": "3.1.2" +} diff --git a/Server File/node_modules/blob/.npmignore b/Server File/node_modules/blob/.npmignore new file mode 100644 index 0000000..548a368 --- /dev/null +++ b/Server File/node_modules/blob/.npmignore @@ -0,0 +1,2 @@ +node_modules +blob.js diff --git a/Server File/node_modules/blob/.zuul.yml b/Server File/node_modules/blob/.zuul.yml new file mode 100644 index 0000000..380c395 --- /dev/null +++ b/Server File/node_modules/blob/.zuul.yml @@ -0,0 +1,14 @@ +ui: mocha-bdd +browsers: + - name: chrome + version: 8..latest + - name: firefox + version: 7..latest + - name: safari + version: 6..latest + - name: opera + version: 12.1..latest + - name: ie + version: 10..latest + - name: android + version: latest diff --git a/Server File/node_modules/blob/Makefile b/Server File/node_modules/blob/Makefile new file mode 100644 index 0000000..7d9601a --- /dev/null +++ b/Server File/node_modules/blob/Makefile @@ -0,0 +1,14 @@ +REPORTER = dot + +build: blob.js + +blob.js: + @./node_modules/.bin/browserify --standalone blob index.js > blob.js + +test: + @./node_modules/.bin/zuul -- test/index.js + +clean: + rm blob.js + +.PHONY: test blob.js diff --git a/Server File/node_modules/blob/README.md b/Server File/node_modules/blob/README.md new file mode 100644 index 0000000..6915955 --- /dev/null +++ b/Server File/node_modules/blob/README.md @@ -0,0 +1,14 @@ +Blob +==== + +A module that exports a constructor that uses window.Blob when available, and a BlobBuilder with any vendor prefix in other cases. If neither is available, it exports undefined. + +Usage: + +```javascript +var Blob = require('blob'); +var b = new Blob(['hi', 'constructing', 'a', 'blob']); +``` + +## Licence +MIT diff --git a/Server File/node_modules/blob/index.js b/Server File/node_modules/blob/index.js new file mode 100644 index 0000000..cad3f84 --- /dev/null +++ b/Server File/node_modules/blob/index.js @@ -0,0 +1,96 @@ +/** + * Create a blob builder even when vendor prefixes exist + */ + +var BlobBuilder = global.BlobBuilder + || global.WebKitBlobBuilder + || global.MSBlobBuilder + || global.MozBlobBuilder; + +/** + * Check if Blob constructor is supported + */ + +var blobSupported = (function() { + try { + var a = new Blob(['hi']); + return a.size === 2; + } catch(e) { + return false; + } +})(); + +/** + * Check if Blob constructor supports ArrayBufferViews + * Fails in Safari 6, so we need to map to ArrayBuffers there. + */ + +var blobSupportsArrayBufferView = blobSupported && (function() { + try { + var b = new Blob([new Uint8Array([1,2])]); + return b.size === 2; + } catch(e) { + return false; + } +})(); + +/** + * Check if BlobBuilder is supported + */ + +var blobBuilderSupported = BlobBuilder + && BlobBuilder.prototype.append + && BlobBuilder.prototype.getBlob; + +/** + * Helper function that maps ArrayBufferViews to ArrayBuffers + * Used by BlobBuilder constructor and old browsers that didn't + * support it in the Blob constructor. + */ + +function mapArrayBufferViews(ary) { + for (var i = 0; i < ary.length; i++) { + var chunk = ary[i]; + if (chunk.buffer instanceof ArrayBuffer) { + var buf = chunk.buffer; + + // if this is a subarray, make a copy so we only + // include the subarray region from the underlying buffer + if (chunk.byteLength !== buf.byteLength) { + var copy = new Uint8Array(chunk.byteLength); + copy.set(new Uint8Array(buf, chunk.byteOffset, chunk.byteLength)); + buf = copy.buffer; + } + + ary[i] = buf; + } + } +} + +function BlobBuilderConstructor(ary, options) { + options = options || {}; + + var bb = new BlobBuilder(); + mapArrayBufferViews(ary); + + for (var i = 0; i < ary.length; i++) { + bb.append(ary[i]); + } + + return (options.type) ? bb.getBlob(options.type) : bb.getBlob(); +}; + +function BlobConstructor(ary, options) { + mapArrayBufferViews(ary); + return new Blob(ary, options || {}); +}; + +module.exports = (function() { + if (blobSupported) { + return blobSupportsArrayBufferView ? global.Blob : BlobConstructor; + } else if (blobBuilderSupported) { + return BlobBuilderConstructor; + } else { + return undefined; + } +})(); diff --git a/Server File/node_modules/blob/package.json b/Server File/node_modules/blob/package.json new file mode 100644 index 0000000..4840db5 --- /dev/null +++ b/Server File/node_modules/blob/package.json @@ -0,0 +1,77 @@ +{ + "_args": [ + [ + { + "raw": "blob@0.0.4", + "scope": null, + "escapedName": "blob", + "name": "blob", + "rawSpec": "0.0.4", + "spec": "0.0.4", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\engine.io-parser" + ] + ], + "_from": "blob@0.0.4", + "_id": "blob@0.0.4", + "_inCache": true, + "_location": "/blob", + "_npmUser": { + "name": "rase-", + "email": "tonykovanen@hotmail.com" + }, + "_npmVersion": "1.4.6", + "_phantomChildren": {}, + "_requested": { + "raw": "blob@0.0.4", + "scope": null, + "escapedName": "blob", + "name": "blob", + "rawSpec": "0.0.4", + "spec": "0.0.4", + "type": "version" + }, + "_requiredBy": [ + "/engine.io-parser" + ], + "_resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", + "_shasum": "bcf13052ca54463f30f9fc7e95b9a47630a94921", + "_shrinkwrap": null, + "_spec": "blob@0.0.4", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\engine.io-parser", + "bugs": { + "url": "https://github.com/rase-/blob/issues" + }, + "dependencies": {}, + "description": "Abstracts out Blob and uses BlobBulder in cases where it is supported with any vendor prefix.", + "devDependencies": { + "browserify": "3.30.1", + "expect.js": "0.2.0", + "mocha": "1.17.1", + "zuul": "1.5.4" + }, + "directories": {}, + "dist": { + "shasum": "bcf13052ca54463f30f9fc7e95b9a47630a94921", + "tarball": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz" + }, + "homepage": "https://github.com/rase-/blob", + "maintainers": [ + { + "name": "rase-", + "email": "tonykovanen@hotmail.com" + } + ], + "name": "blob", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/rase-/blob.git" + }, + "scripts": { + "test": "make test" + }, + "version": "0.0.4" +} diff --git a/Server File/node_modules/blob/test/index.js b/Server File/node_modules/blob/test/index.js new file mode 100644 index 0000000..df9303f --- /dev/null +++ b/Server File/node_modules/blob/test/index.js @@ -0,0 +1,94 @@ +var Blob = require('../'); +var expect = require('expect.js'); + +describe('blob', function() { + if (!Blob) { + it('should not have a blob or a blob builder in the global namespace, or blob should not be a constructor function if the module exports false', function() { + try { + var ab = (new Uint8Array(5)).buffer; + global.Blob([ab]); + expect().fail('Blob shouldn\'t be constructable'); + } catch (e) {} + + var BlobBuilder = global.BlobBuilder + || global.WebKitBlobBuilder + || global.MSBlobBuilder + || global.MozBlobBuilder; + expect(BlobBuilder).to.be(undefined); + }); + } else { + it('should encode a proper sized blob when given a string argument', function() { + var b = new Blob(['hi']); + expect(b.size).to.be(2); + }); + + it('should encode a blob with proper size when given two strings as arguments', function() { + var b = new Blob(['hi', 'hello']); + expect(b.size).to.be(7); + }); + + it('should encode arraybuffers with right content', function(done) { + var ary = new Uint8Array(5); + for (var i = 0; i < 5; i++) ary[i] = i; + var b = new Blob([ary.buffer]); + var fr = new FileReader(); + fr.onload = function() { + var newAry = new Uint8Array(this.result); + for (var i = 0; i < 5; i++) expect(newAry[i]).to.be(i); + done(); + }; + fr.readAsArrayBuffer(b); + }); + + it('should encode typed arrays with right content', function(done) { + var ary = new Uint8Array(5); + for (var i = 0; i < 5; i++) ary[i] = i; + var b = new Blob([ary]); + var fr = new FileReader(); + fr.onload = function() { + var newAry = new Uint8Array(this.result); + for (var i = 0; i < 5; i++) expect(newAry[i]).to.be(i); + done(); + }; + fr.readAsArrayBuffer(b); + }); + + it('should encode sliced typed arrays with right content', function(done) { + var ary = new Uint8Array(5); + for (var i = 0; i < 5; i++) ary[i] = i; + var b = new Blob([ary.subarray(2)]); + var fr = new FileReader(); + fr.onload = function() { + var newAry = new Uint8Array(this.result); + for (var i = 0; i < 3; i++) expect(newAry[i]).to.be(i + 2); + done(); + }; + fr.readAsArrayBuffer(b); + }); + + it('should encode with blobs', function(done) { + var ary = new Uint8Array(5); + for (var i = 0; i < 5; i++) ary[i] = i; + var b = new Blob([new Blob([ary.buffer])]); + var fr = new FileReader(); + fr.onload = function() { + var newAry = new Uint8Array(this.result); + for (var i = 0; i < 5; i++) expect(newAry[i]).to.be(i); + done(); + }; + fr.readAsArrayBuffer(b); + }); + + it('should enode mixed contents to right size', function() { + var ary = new Uint8Array(5); + for (var i = 0; i < 5; i++) ary[i] = i; + var b = new Blob([ary.buffer, 'hello']); + expect(b.size).to.be(10); + }); + + it('should accept mime type', function() { + var b = new Blob(['hi', 'hello'], { type: 'text/html' }); + expect(b.type).to.be('text/html'); + }); + } +}); diff --git a/Server File/node_modules/callsite/.npmignore b/Server File/node_modules/callsite/.npmignore new file mode 100644 index 0000000..f1250e5 --- /dev/null +++ b/Server File/node_modules/callsite/.npmignore @@ -0,0 +1,4 @@ +support +test +examples +*.sock diff --git a/Server File/node_modules/callsite/History.md b/Server File/node_modules/callsite/History.md new file mode 100644 index 0000000..4994198 --- /dev/null +++ b/Server File/node_modules/callsite/History.md @@ -0,0 +1,10 @@ + +1.0.0 / 2013-01-24 +================== + + * remove lame magical getters + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/Server File/node_modules/callsite/Makefile b/Server File/node_modules/callsite/Makefile new file mode 100644 index 0000000..634e372 --- /dev/null +++ b/Server File/node_modules/callsite/Makefile @@ -0,0 +1,6 @@ + +test: + @./node_modules/.bin/mocha \ + --require should + +.PHONY: test \ No newline at end of file diff --git a/Server File/node_modules/callsite/Readme.md b/Server File/node_modules/callsite/Readme.md new file mode 100644 index 0000000..0dbd16a --- /dev/null +++ b/Server File/node_modules/callsite/Readme.md @@ -0,0 +1,44 @@ +# callstack + + Access to v8's "raw" `CallSite`s. + +## Installation + + $ npm install callsite + +## Example + +```js +var stack = require('callsite'); + +foo(); + +function foo() { + bar(); +} + +function bar() { + baz(); +} + +function baz() { + console.log(); + stack().forEach(function(site){ + console.log(' \033[36m%s\033[90m in %s:%d\033[0m' + , site.getFunctionName() || 'anonymous' + , site.getFileName() + , site.getLineNumber()); + }); + console.log(); +} +``` + +## Why? + + Because you can do weird, stupid, clever, wacky things such as: + + - [better-assert](https://github.com/visionmedia/better-assert) + +## License + + MIT diff --git a/Server File/node_modules/callsite/index.js b/Server File/node_modules/callsite/index.js new file mode 100644 index 0000000..d3ee6f8 --- /dev/null +++ b/Server File/node_modules/callsite/index.js @@ -0,0 +1,10 @@ + +module.exports = function(){ + var orig = Error.prepareStackTrace; + Error.prepareStackTrace = function(_, stack){ return stack; }; + var err = new Error; + Error.captureStackTrace(err, arguments.callee); + var stack = err.stack; + Error.prepareStackTrace = orig; + return stack; +}; diff --git a/Server File/node_modules/callsite/package.json b/Server File/node_modules/callsite/package.json new file mode 100644 index 0000000..84357b0 --- /dev/null +++ b/Server File/node_modules/callsite/package.json @@ -0,0 +1,77 @@ +{ + "_args": [ + [ + { + "raw": "callsite@1.0.0", + "scope": null, + "escapedName": "callsite", + "name": "callsite", + "rawSpec": "1.0.0", + "spec": "1.0.0", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\better-assert" + ] + ], + "_from": "callsite@1.0.0", + "_id": "callsite@1.0.0", + "_inCache": true, + "_location": "/callsite", + "_npmUser": { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + }, + "_npmVersion": "1.2.2", + "_phantomChildren": {}, + "_requested": { + "raw": "callsite@1.0.0", + "scope": null, + "escapedName": "callsite", + "name": "callsite", + "rawSpec": "1.0.0", + "spec": "1.0.0", + "type": "version" + }, + "_requiredBy": [ + "/better-assert" + ], + "_resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "_shasum": "280398e5d664bd74038b6f0905153e6e8af1bc20", + "_shrinkwrap": null, + "_spec": "callsite@1.0.0", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\better-assert", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "dependencies": {}, + "description": "access to v8's CallSites", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "280398e5d664bd74038b6f0905153e6e8af1bc20", + "tarball": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz" + }, + "engines": { + "node": "*" + }, + "keywords": [ + "stack", + "trace", + "line" + ], + "main": "index", + "maintainers": [ + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + } + ], + "name": "callsite", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "version": "1.0.0" +} diff --git a/Server File/node_modules/component-bind/.npmignore b/Server File/node_modules/component-bind/.npmignore new file mode 100644 index 0000000..f1250e5 --- /dev/null +++ b/Server File/node_modules/component-bind/.npmignore @@ -0,0 +1,4 @@ +support +test +examples +*.sock diff --git a/Server File/node_modules/component-bind/History.md b/Server File/node_modules/component-bind/History.md new file mode 100644 index 0000000..2795fdb --- /dev/null +++ b/Server File/node_modules/component-bind/History.md @@ -0,0 +1,13 @@ + +1.0.0 / 2014-05-27 +================== + + * index: use slice ref (#7, @viatropos) + * package: rename package to "component-bind" + * package: add "repository" field (#6, @repoify) + * package: add "component" section + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/Server File/node_modules/component-bind/Makefile b/Server File/node_modules/component-bind/Makefile new file mode 100644 index 0000000..4e9c8d3 --- /dev/null +++ b/Server File/node_modules/component-bind/Makefile @@ -0,0 +1,7 @@ + +test: + @./node_modules/.bin/mocha \ + --require should \ + --reporter spec + +.PHONY: test \ No newline at end of file diff --git a/Server File/node_modules/component-bind/Readme.md b/Server File/node_modules/component-bind/Readme.md new file mode 100644 index 0000000..6a8febc --- /dev/null +++ b/Server File/node_modules/component-bind/Readme.md @@ -0,0 +1,64 @@ +# bind + + Function binding utility. + +## Installation + +``` +$ component install component/bind +``` + +## API + + - [bind(obj, fn)](#bindobj-fn) + - [bind(obj, fn, ...)](#bindobj-fn-) + - [bind(obj, name)](#bindobj-name) + + + +### bind(obj, fn) +should bind the function to the given object. + +```js +var tobi = { name: 'tobi' }; + +function name() { + return this.name; +} + +var fn = bind(tobi, name); +fn().should.equal('tobi'); +``` + + +### bind(obj, fn, ...) +should curry the remaining arguments. + +```js +function add(a, b) { + return a + b; +} + +bind(null, add)(1, 2).should.equal(3); +bind(null, add, 1)(2).should.equal(3); +bind(null, add, 1, 2)().should.equal(3); +``` + + +### bind(obj, name) +should bind the method of the given name. + +```js +var tobi = { name: 'tobi' }; + +tobi.getName = function() { + return this.name; +}; + +var fn = bind(tobi, 'getName'); +fn().should.equal('tobi'); +``` + +## License + + MIT \ No newline at end of file diff --git a/Server File/node_modules/component-bind/component.json b/Server File/node_modules/component-bind/component.json new file mode 100644 index 0000000..4e1e93f --- /dev/null +++ b/Server File/node_modules/component-bind/component.json @@ -0,0 +1,13 @@ +{ + "name": "bind", + "version": "1.0.0", + "description": "function binding utility", + "keywords": [ + "bind", + "utility" + ], + "dependencies": {}, + "scripts": [ + "index.js" + ] +} diff --git a/Server File/node_modules/component-bind/index.js b/Server File/node_modules/component-bind/index.js new file mode 100644 index 0000000..4eeb2c0 --- /dev/null +++ b/Server File/node_modules/component-bind/index.js @@ -0,0 +1,23 @@ +/** + * Slice reference. + */ + +var slice = [].slice; + +/** + * Bind `obj` to `fn`. + * + * @param {Object} obj + * @param {Function|String} fn or string + * @return {Function} + * @api public + */ + +module.exports = function(obj, fn){ + if ('string' == typeof fn) fn = obj[fn]; + if ('function' != typeof fn) throw new Error('bind() requires a function'); + var args = slice.call(arguments, 2); + return function(){ + return fn.apply(obj, args.concat(slice.call(arguments))); + } +}; diff --git a/Server File/node_modules/component-bind/package.json b/Server File/node_modules/component-bind/package.json new file mode 100644 index 0000000..5e31507 --- /dev/null +++ b/Server File/node_modules/component-bind/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + { + "raw": "component-bind@1.0.0", + "scope": null, + "escapedName": "component-bind", + "name": "component-bind", + "rawSpec": "1.0.0", + "spec": "1.0.0", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\socket.io-client" + ] + ], + "_from": "component-bind@1.0.0", + "_id": "component-bind@1.0.0", + "_inCache": true, + "_location": "/component-bind", + "_npmUser": { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + "_npmVersion": "1.4.9", + "_phantomChildren": {}, + "_requested": { + "raw": "component-bind@1.0.0", + "scope": null, + "escapedName": "component-bind", + "name": "component-bind", + "rawSpec": "1.0.0", + "spec": "1.0.0", + "type": "version" + }, + "_requiredBy": [ + "/socket.io-client" + ], + "_resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "_shasum": "00c608ab7dcd93897c0009651b1d3a8e1e73bbd1", + "_shrinkwrap": null, + "_spec": "component-bind@1.0.0", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\socket.io-client", + "bugs": { + "url": "https://github.com/component/bind/issues" + }, + "component": { + "scripts": { + "bind/index.js": "index.js" + } + }, + "dependencies": {}, + "description": "function binding utility", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "00c608ab7dcd93897c0009651b1d3a8e1e73bbd1", + "tarball": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz" + }, + "homepage": "https://github.com/component/bind", + "keywords": [ + "bind", + "utility" + ], + "maintainers": [ + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + } + ], + "name": "component-bind", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/component/bind.git" + }, + "version": "1.0.0" +} diff --git a/Server File/node_modules/component-emitter/History.md b/Server File/node_modules/component-emitter/History.md new file mode 100644 index 0000000..2a49b63 --- /dev/null +++ b/Server File/node_modules/component-emitter/History.md @@ -0,0 +1,68 @@ + +1.2.1 / 2016-04-18 +================== + + * enable client side use + +1.2.0 / 2014-02-12 +================== + + * prefix events with `$` to support object prototype method names + +1.1.3 / 2014-06-20 +================== + + * republish for npm + * add LICENSE file + +1.1.2 / 2014-02-10 +================== + + * package: rename to "component-emitter" + * package: update "main" and "component" fields + * Add license to Readme (same format as the other components) + * created .npmignore + * travis stuff + +1.1.1 / 2013-12-01 +================== + + * fix .once adding .on to the listener + * docs: Emitter#off() + * component: add `.repo` prop + +1.1.0 / 2013-10-20 +================== + + * add `.addEventListener()` and `.removeEventListener()` aliases + +1.0.1 / 2013-06-27 +================== + + * add support for legacy ie + +1.0.0 / 2013-02-26 +================== + + * add `.off()` support for removing all listeners + +0.0.6 / 2012-10-08 +================== + + * add `this._callbacks` initialization to prevent funky gotcha + +0.0.5 / 2012-09-07 +================== + + * fix `Emitter.call(this)` usage + +0.0.3 / 2012-07-11 +================== + + * add `.listeners()` + * rename `.has()` to `.hasListeners()` + +0.0.2 / 2012-06-28 +================== + + * fix `.off()` with `.once()`-registered callbacks diff --git a/Server File/node_modules/component-emitter/LICENSE b/Server File/node_modules/component-emitter/LICENSE new file mode 100644 index 0000000..de51692 --- /dev/null +++ b/Server File/node_modules/component-emitter/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2014 Component contributors + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/Server File/node_modules/component-emitter/Readme.md b/Server File/node_modules/component-emitter/Readme.md new file mode 100644 index 0000000..0f3f9b9 --- /dev/null +++ b/Server File/node_modules/component-emitter/Readme.md @@ -0,0 +1,74 @@ +# Emitter [![Build Status](https://travis-ci.org/component/emitter.png)](https://travis-ci.org/component/emitter) + + Event emitter component. + +## Installation + +``` +$ component install component/emitter +``` + +## API + +### Emitter(obj) + + The `Emitter` may also be used as a mixin. For example + a "plain" object may become an emitter, or you may + extend an existing prototype. + + As an `Emitter` instance: + +```js +var Emitter = require('emitter'); +var emitter = new Emitter; +emitter.emit('something'); +``` + + As a mixin: + +```js +var Emitter = require('emitter'); +var user = { name: 'tobi' }; +Emitter(user); + +user.emit('im a user'); +``` + + As a prototype mixin: + +```js +var Emitter = require('emitter'); +Emitter(User.prototype); +``` + +### Emitter#on(event, fn) + + Register an `event` handler `fn`. + +### Emitter#once(event, fn) + + Register a single-shot `event` handler `fn`, + removed immediately after it is invoked the + first time. + +### Emitter#off(event, fn) + + * Pass `event` and `fn` to remove a listener. + * Pass `event` to remove all listeners on that event. + * Pass nothing to remove all listeners on all events. + +### Emitter#emit(event, ...) + + Emit an `event` with variable option args. + +### Emitter#listeners(event) + + Return an array of callbacks, or an empty array. + +### Emitter#hasListeners(event) + + Check if this emitter has `event` handlers. + +## License + +MIT diff --git a/Server File/node_modules/component-emitter/index.js b/Server File/node_modules/component-emitter/index.js new file mode 100644 index 0000000..fa4faee --- /dev/null +++ b/Server File/node_modules/component-emitter/index.js @@ -0,0 +1,163 @@ + +/** + * Expose `Emitter`. + */ + +if (typeof module !== 'undefined') { + module.exports = Emitter; +} + +/** + * Initialize a new `Emitter`. + * + * @api public + */ + +function Emitter(obj) { + if (obj) return mixin(obj); +}; + +/** + * Mixin the emitter properties. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + +function mixin(obj) { + for (var key in Emitter.prototype) { + obj[key] = Emitter.prototype[key]; + } + return obj; +} + +/** + * Listen on the given `event` with `fn`. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.on = +Emitter.prototype.addEventListener = function(event, fn){ + this._callbacks = this._callbacks || {}; + (this._callbacks['$' + event] = this._callbacks['$' + event] || []) + .push(fn); + return this; +}; + +/** + * Adds an `event` listener that will be invoked a single + * time then automatically removed. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.once = function(event, fn){ + function on() { + this.off(event, on); + fn.apply(this, arguments); + } + + on.fn = fn; + this.on(event, on); + return this; +}; + +/** + * Remove the given callback for `event` or all + * registered callbacks. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.off = +Emitter.prototype.removeListener = +Emitter.prototype.removeAllListeners = +Emitter.prototype.removeEventListener = function(event, fn){ + this._callbacks = this._callbacks || {}; + + // all + if (0 == arguments.length) { + this._callbacks = {}; + return this; + } + + // specific event + var callbacks = this._callbacks['$' + event]; + if (!callbacks) return this; + + // remove all handlers + if (1 == arguments.length) { + delete this._callbacks['$' + event]; + return this; + } + + // remove specific handler + var cb; + for (var i = 0; i < callbacks.length; i++) { + cb = callbacks[i]; + if (cb === fn || cb.fn === fn) { + callbacks.splice(i, 1); + break; + } + } + return this; +}; + +/** + * Emit `event` with the given args. + * + * @param {String} event + * @param {Mixed} ... + * @return {Emitter} + */ + +Emitter.prototype.emit = function(event){ + this._callbacks = this._callbacks || {}; + var args = [].slice.call(arguments, 1) + , callbacks = this._callbacks['$' + event]; + + if (callbacks) { + callbacks = callbacks.slice(0); + for (var i = 0, len = callbacks.length; i < len; ++i) { + callbacks[i].apply(this, args); + } + } + + return this; +}; + +/** + * Return array of callbacks for `event`. + * + * @param {String} event + * @return {Array} + * @api public + */ + +Emitter.prototype.listeners = function(event){ + this._callbacks = this._callbacks || {}; + return this._callbacks['$' + event] || []; +}; + +/** + * Check if this emitter has `event` handlers. + * + * @param {String} event + * @return {Boolean} + * @api public + */ + +Emitter.prototype.hasListeners = function(event){ + return !! this.listeners(event).length; +}; diff --git a/Server File/node_modules/component-emitter/package.json b/Server File/node_modules/component-emitter/package.json new file mode 100644 index 0000000..4918aef --- /dev/null +++ b/Server File/node_modules/component-emitter/package.json @@ -0,0 +1,218 @@ +{ + "_args": [ + [ + { + "raw": "component-emitter@1.2.1", + "scope": null, + "escapedName": "component-emitter", + "name": "component-emitter", + "rawSpec": "1.2.1", + "spec": "1.2.1", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\socket.io-client" + ] + ], + "_from": "component-emitter@1.2.1", + "_id": "component-emitter@1.2.1", + "_inCache": true, + "_location": "/component-emitter", + "_nodeVersion": "0.12.4", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/component-emitter-1.2.1.tgz_1461005707641_0.14232611074112356" + }, + "_npmUser": { + "name": "nami-doc", + "email": "karp@hotmail.fr" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "raw": "component-emitter@1.2.1", + "scope": null, + "escapedName": "component-emitter", + "name": "component-emitter", + "rawSpec": "1.2.1", + "spec": "1.2.1", + "type": "version" + }, + "_requiredBy": [ + "/engine.io-client", + "/socket.io-client", + "/socket.io-parser" + ], + "_resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "_shasum": "137918d6d78283f7df7a6b7c5a63e140e69425e6", + "_shrinkwrap": null, + "_spec": "component-emitter@1.2.1", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\socket.io-client", + "bugs": { + "url": "https://github.com/component/emitter/issues" + }, + "component": { + "scripts": { + "emitter/index.js": "index.js" + } + }, + "dependencies": {}, + "description": "Event emitter", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "137918d6d78283f7df7a6b7c5a63e140e69425e6", + "tarball": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz" + }, + "files": [ + "index.js", + "LICENSE" + ], + "gitHead": "187492ab8028c7221b589bdfd482b715149cd868", + "homepage": "https://github.com/component/emitter#readme", + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "hughsk", + "email": "hughskennedy@gmail.com" + }, + { + "name": "trevorgerhardt", + "email": "trevorgerhardt@gmail.com" + }, + { + "name": "timaschew", + "email": "timaschew@gmail.com" + }, + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + }, + { + "name": "rauchg", + "email": "rauchg@gmail.com" + }, + { + "name": "retrofox", + "email": "rdsuarez@gmail.com" + }, + { + "name": "coreh", + "email": "thecoreh@gmail.com" + }, + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + { + "name": "kelonye", + "email": "kelonyemitchel@gmail.com" + }, + { + "name": "mattmueller", + "email": "mattmuelle@gmail.com" + }, + { + "name": "yields", + "email": "yields@icloud.com" + }, + { + "name": "anthonyshort", + "email": "antshort@gmail.com" + }, + { + "name": "jongleberry", + "email": "jonathanrichardong@gmail.com" + }, + { + "name": "ianstormtaylor", + "email": "ian@ianstormtaylor.com" + }, + { + "name": "cristiandouce", + "email": "cristian@gravityonmars.com" + }, + { + "name": "swatinem", + "email": "arpad.borsos@googlemail.com" + }, + { + "name": "stagas", + "email": "gstagas@gmail.com" + }, + { + "name": "amasad", + "email": "amjad.masad@gmail.com" + }, + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + { + "name": "calvinfo", + "email": "calvin@calv.info" + }, + { + "name": "dominicbarnes", + "email": "dominic@dbarnes.info" + }, + { + "name": "blakeembrey", + "email": "hello@blakeembrey.com" + }, + { + "name": "timoxley", + "email": "secoif@gmail.com" + }, + { + "name": "jonathanong", + "email": "jonathanrichardong@gmail.com" + }, + { + "name": "queckezz", + "email": "fabian.eichenberger@gmail.com" + }, + { + "name": "nami-doc", + "email": "vendethiel@hotmail.fr" + }, + { + "name": "clintwood", + "email": "clint@anotherway.co.za" + }, + { + "name": "thehydroimpulse", + "email": "dnfagnan@gmail.com" + }, + { + "name": "stephenmathieson", + "email": "me@stephenmathieson.com" + }, + { + "name": "dfcreative", + "email": "df.creative@gmail.com" + }, + { + "name": "defunctzombie", + "email": "shtylman@gmail.com" + } + ], + "name": "component-emitter", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/component/emitter.git" + }, + "scripts": { + "test": "make test" + }, + "version": "1.2.1" +} diff --git a/Server File/node_modules/component-inherit/.npmignore b/Server File/node_modules/component-inherit/.npmignore new file mode 100644 index 0000000..665aa21 --- /dev/null +++ b/Server File/node_modules/component-inherit/.npmignore @@ -0,0 +1,3 @@ +components +build +node_modules diff --git a/Server File/node_modules/component-inherit/History.md b/Server File/node_modules/component-inherit/History.md new file mode 100644 index 0000000..22d87e1 --- /dev/null +++ b/Server File/node_modules/component-inherit/History.md @@ -0,0 +1,5 @@ + +0.0.2 / 2012-09-03 +================== + + * fix typo in package.json diff --git a/Server File/node_modules/component-inherit/Makefile b/Server File/node_modules/component-inherit/Makefile new file mode 100644 index 0000000..ebbc52a --- /dev/null +++ b/Server File/node_modules/component-inherit/Makefile @@ -0,0 +1,16 @@ + +build: components index.js + @component build + +components: + @Component install + +clean: + rm -fr build components template.js + +test: + @node_modules/.bin/mocha \ + --require should \ + --reporter spec + +.PHONY: clean test diff --git a/Server File/node_modules/component-inherit/Readme.md b/Server File/node_modules/component-inherit/Readme.md new file mode 100644 index 0000000..f03ab27 --- /dev/null +++ b/Server File/node_modules/component-inherit/Readme.md @@ -0,0 +1,24 @@ +# inherit + + Prototype inheritance utility. + +## Installation + +``` +$ component install component/inherit +``` + +## Example + +```js +var inherit = require('inherit'); + +function Human() {} +function Woman() {} + +inherit(Woman, Human); +``` + +## License + + MIT diff --git a/Server File/node_modules/component-inherit/component.json b/Server File/node_modules/component-inherit/component.json new file mode 100644 index 0000000..ae57747 --- /dev/null +++ b/Server File/node_modules/component-inherit/component.json @@ -0,0 +1,10 @@ +{ + "name": "inherit", + "description": "Prototype inheritance utility", + "version": "0.0.3", + "keywords": ["inherit", "utility"], + "dependencies": {}, + "scripts": [ + "index.js" + ] +} diff --git a/Server File/node_modules/component-inherit/index.js b/Server File/node_modules/component-inherit/index.js new file mode 100644 index 0000000..aaebc03 --- /dev/null +++ b/Server File/node_modules/component-inherit/index.js @@ -0,0 +1,7 @@ + +module.exports = function(a, b){ + var fn = function(){}; + fn.prototype = b.prototype; + a.prototype = new fn; + a.prototype.constructor = a; +}; \ No newline at end of file diff --git a/Server File/node_modules/component-inherit/package.json b/Server File/node_modules/component-inherit/package.json new file mode 100644 index 0000000..ac42303 --- /dev/null +++ b/Server File/node_modules/component-inherit/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + { + "raw": "component-inherit@0.0.3", + "scope": null, + "escapedName": "component-inherit", + "name": "component-inherit", + "rawSpec": "0.0.3", + "spec": "0.0.3", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\engine.io-client" + ] + ], + "_from": "component-inherit@0.0.3", + "_id": "component-inherit@0.0.3", + "_inCache": true, + "_location": "/component-inherit", + "_npmUser": { + "name": "coreh", + "email": "thecoreh@gmail.com" + }, + "_npmVersion": "1.3.24", + "_phantomChildren": {}, + "_requested": { + "raw": "component-inherit@0.0.3", + "scope": null, + "escapedName": "component-inherit", + "name": "component-inherit", + "rawSpec": "0.0.3", + "spec": "0.0.3", + "type": "version" + }, + "_requiredBy": [ + "/engine.io-client" + ], + "_resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "_shasum": "645fc4adf58b72b649d5cae65135619db26ff143", + "_shrinkwrap": null, + "_spec": "component-inherit@0.0.3", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\engine.io-client", + "bugs": { + "url": "https://github.com/component/inherit/issues" + }, + "component": { + "scripts": { + "inherit/index.js": "index.js" + } + }, + "dependencies": {}, + "description": "Prototype inheritance utility", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "645fc4adf58b72b649d5cae65135619db26ff143", + "tarball": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz" + }, + "homepage": "https://github.com/component/inherit", + "keywords": [ + "inherit", + "utility" + ], + "maintainers": [ + { + "name": "coreh", + "email": "thecoreh@gmail.com" + } + ], + "name": "component-inherit", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/component/inherit.git" + }, + "version": "0.0.3" +} diff --git a/Server File/node_modules/component-inherit/test/inherit.js b/Server File/node_modules/component-inherit/test/inherit.js new file mode 100644 index 0000000..14852f2 --- /dev/null +++ b/Server File/node_modules/component-inherit/test/inherit.js @@ -0,0 +1,21 @@ + +/** + * Module dependencies. + */ + +var inherit = require('..'); + +describe('inherit(a, b)', function(){ + it('should inherit b\'s prototype', function(){ + function Loki(){} + function Animal(){} + + Animal.prototype.species = 'unknown'; + + inherit(Loki, Animal); + + var loki = new Loki; + loki.species.should.equal('unknown'); + loki.constructor.should.equal(Loki); + }) +}) \ No newline at end of file diff --git a/Server File/node_modules/content-disposition/HISTORY.md b/Server File/node_modules/content-disposition/HISTORY.md new file mode 100644 index 0000000..53849b6 --- /dev/null +++ b/Server File/node_modules/content-disposition/HISTORY.md @@ -0,0 +1,50 @@ +0.5.2 / 2016-12-08 +================== + + * Fix `parse` to accept any linear whitespace character + +0.5.1 / 2016-01-17 +================== + + * perf: enable strict mode + +0.5.0 / 2014-10-11 +================== + + * Add `parse` function + +0.4.0 / 2014-09-21 +================== + + * Expand non-Unicode `filename` to the full ISO-8859-1 charset + +0.3.0 / 2014-09-20 +================== + + * Add `fallback` option + * Add `type` option + +0.2.0 / 2014-09-19 +================== + + * Reduce ambiguity of file names with hex escape in buggy browsers + +0.1.2 / 2014-09-19 +================== + + * Fix periodic invalid Unicode filename header + +0.1.1 / 2014-09-19 +================== + + * Fix invalid characters appearing in `filename*` parameter + +0.1.0 / 2014-09-18 +================== + + * Make the `filename` argument optional + +0.0.0 / 2014-09-18 +================== + + * Initial release diff --git a/Server File/node_modules/content-disposition/LICENSE b/Server File/node_modules/content-disposition/LICENSE new file mode 100644 index 0000000..b7dce6c --- /dev/null +++ b/Server File/node_modules/content-disposition/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Server File/node_modules/content-disposition/README.md b/Server File/node_modules/content-disposition/README.md new file mode 100644 index 0000000..992d19a --- /dev/null +++ b/Server File/node_modules/content-disposition/README.md @@ -0,0 +1,141 @@ +# content-disposition + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Create and parse HTTP `Content-Disposition` header + +## Installation + +```sh +$ npm install content-disposition +``` + +## API + +```js +var contentDisposition = require('content-disposition') +``` + +### contentDisposition(filename, options) + +Create an attachment `Content-Disposition` header value using the given file name, +if supplied. The `filename` is optional and if no file name is desired, but you +want to specify `options`, set `filename` to `undefined`. + +```js +res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf')) +``` + +**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this +header through a means different from `setHeader` in Node.js, you'll want to specify +the `'binary'` encoding in Node.js. + +#### Options + +`contentDisposition` accepts these properties in the options object. + +##### fallback + +If the `filename` option is outside ISO-8859-1, then the file name is actually +stored in a supplemental field for clients that support Unicode file names and +a ISO-8859-1 version of the file name is automatically generated. + +This specifies the ISO-8859-1 file name to override the automatic generation or +disables the generation all together, defaults to `true`. + + - A string will specify the ISO-8859-1 file name to use in place of automatic + generation. + - `false` will disable including a ISO-8859-1 file name and only include the + Unicode version (unless the file name is already ISO-8859-1). + - `true` will enable automatic generation if the file name is outside ISO-8859-1. + +If the `filename` option is ISO-8859-1 and this option is specified and has a +different value, then the `filename` option is encoded in the extended field +and this set as the fallback field, even though they are both ISO-8859-1. + +##### type + +Specifies the disposition type, defaults to `"attachment"`. This can also be +`"inline"`, or any other value (all values except inline are treated like +`attachment`, but can convey additional information if both parties agree to +it). The type is normalized to lower-case. + +### contentDisposition.parse(string) + +```js +var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'); +``` + +Parse a `Content-Disposition` header string. This automatically handles extended +("Unicode") parameters by decoding them and providing them under the standard +parameter name. This will return an object with the following properties (examples +are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`): + + - `type`: The disposition type (always lower case). Example: `'attachment'` + + - `parameters`: An object of the parameters in the disposition (name of parameter + always lower case and extended versions replace non-extended versions). Example: + `{filename: "€ rates.txt"}` + +## Examples + +### Send a file for download + +```js +var contentDisposition = require('content-disposition') +var destroy = require('destroy') +var http = require('http') +var onFinished = require('on-finished') + +var filePath = '/path/to/public/plans.pdf' + +http.createServer(function onRequest(req, res) { + // set headers + res.setHeader('Content-Type', 'application/pdf') + res.setHeader('Content-Disposition', contentDisposition(filePath)) + + // send file + var stream = fs.createReadStream(filePath) + stream.pipe(res) + onFinished(res, function (err) { + destroy(stream) + }) +}) +``` + +## Testing + +```sh +$ npm test +``` + +## References + +- [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1][rfc-2616] +- [RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters][rfc-5987] +- [RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)][rfc-6266] +- [Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987][tc-2231] + +[rfc-2616]: https://tools.ietf.org/html/rfc2616 +[rfc-5987]: https://tools.ietf.org/html/rfc5987 +[rfc-6266]: https://tools.ietf.org/html/rfc6266 +[tc-2231]: http://greenbytes.de/tech/tc2231/ + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/content-disposition.svg?style=flat +[npm-url]: https://npmjs.org/package/content-disposition +[node-version-image]: https://img.shields.io/node/v/content-disposition.svg?style=flat +[node-version-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/jshttp/content-disposition.svg?style=flat +[travis-url]: https://travis-ci.org/jshttp/content-disposition +[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg?style=flat +[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master +[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg?style=flat +[downloads-url]: https://npmjs.org/package/content-disposition diff --git a/Server File/node_modules/content-disposition/index.js b/Server File/node_modules/content-disposition/index.js new file mode 100644 index 0000000..88a0d0a --- /dev/null +++ b/Server File/node_modules/content-disposition/index.js @@ -0,0 +1,445 @@ +/*! + * content-disposition + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + */ + +module.exports = contentDisposition +module.exports.parse = parse + +/** + * Module dependencies. + */ + +var basename = require('path').basename + +/** + * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%") + */ + +var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g // eslint-disable-line no-control-regex + +/** + * RegExp to match percent encoding escape. + */ + +var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/ +var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g + +/** + * RegExp to match non-latin1 characters. + */ + +var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g + +/** + * RegExp to match quoted-pair in RFC 2616 + * + * quoted-pair = "\" CHAR + * CHAR = + */ + +var QESC_REGEXP = /\\([\u0000-\u007f])/g + +/** + * RegExp to match chars that must be quoted-pair in RFC 2616 + */ + +var QUOTE_REGEXP = /([\\"])/g + +/** + * RegExp for various RFC 2616 grammar + * + * parameter = token "=" ( token | quoted-string ) + * token = 1* + * separators = "(" | ")" | "<" | ">" | "@" + * | "," | ";" | ":" | "\" | <"> + * | "/" | "[" | "]" | "?" | "=" + * | "{" | "}" | SP | HT + * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) + * qdtext = > + * quoted-pair = "\" CHAR + * CHAR = + * TEXT = + * LWS = [CRLF] 1*( SP | HT ) + * CRLF = CR LF + * CR = + * LF = + * SP = + * HT = + * CTL = + * OCTET = + */ + +var PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g // eslint-disable-line no-control-regex +var TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/ +var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/ + +/** + * RegExp for various RFC 5987 grammar + * + * ext-value = charset "'" [ language ] "'" value-chars + * charset = "UTF-8" / "ISO-8859-1" / mime-charset + * mime-charset = 1*mime-charsetc + * mime-charsetc = ALPHA / DIGIT + * / "!" / "#" / "$" / "%" / "&" + * / "+" / "-" / "^" / "_" / "`" + * / "{" / "}" / "~" + * language = ( 2*3ALPHA [ extlang ] ) + * / 4ALPHA + * / 5*8ALPHA + * extlang = *3( "-" 3ALPHA ) + * value-chars = *( pct-encoded / attr-char ) + * pct-encoded = "%" HEXDIG HEXDIG + * attr-char = ALPHA / DIGIT + * / "!" / "#" / "$" / "&" / "+" / "-" / "." + * / "^" / "_" / "`" / "|" / "~" + */ + +var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/ + +/** + * RegExp for various RFC 6266 grammar + * + * disposition-type = "inline" | "attachment" | disp-ext-type + * disp-ext-type = token + * disposition-parm = filename-parm | disp-ext-parm + * filename-parm = "filename" "=" value + * | "filename*" "=" ext-value + * disp-ext-parm = token "=" value + * | ext-token "=" ext-value + * ext-token = + */ + +var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/ // eslint-disable-line no-control-regex + +/** + * Create an attachment Content-Disposition header. + * + * @param {string} [filename] + * @param {object} [options] + * @param {string} [options.type=attachment] + * @param {string|boolean} [options.fallback=true] + * @return {string} + * @api public + */ + +function contentDisposition (filename, options) { + var opts = options || {} + + // get type + var type = opts.type || 'attachment' + + // get parameters + var params = createparams(filename, opts.fallback) + + // format into string + return format(new ContentDisposition(type, params)) +} + +/** + * Create parameters object from filename and fallback. + * + * @param {string} [filename] + * @param {string|boolean} [fallback=true] + * @return {object} + * @api private + */ + +function createparams (filename, fallback) { + if (filename === undefined) { + return + } + + var params = {} + + if (typeof filename !== 'string') { + throw new TypeError('filename must be a string') + } + + // fallback defaults to true + if (fallback === undefined) { + fallback = true + } + + if (typeof fallback !== 'string' && typeof fallback !== 'boolean') { + throw new TypeError('fallback must be a string or boolean') + } + + if (typeof fallback === 'string' && NON_LATIN1_REGEXP.test(fallback)) { + throw new TypeError('fallback must be ISO-8859-1 string') + } + + // restrict to file base name + var name = basename(filename) + + // determine if name is suitable for quoted string + var isQuotedString = TEXT_REGEXP.test(name) + + // generate fallback name + var fallbackName = typeof fallback !== 'string' + ? fallback && getlatin1(name) + : basename(fallback) + var hasFallback = typeof fallbackName === 'string' && fallbackName !== name + + // set extended filename parameter + if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) { + params['filename*'] = name + } + + // set filename parameter + if (isQuotedString || hasFallback) { + params.filename = hasFallback + ? fallbackName + : name + } + + return params +} + +/** + * Format object to Content-Disposition header. + * + * @param {object} obj + * @param {string} obj.type + * @param {object} [obj.parameters] + * @return {string} + * @api private + */ + +function format (obj) { + var parameters = obj.parameters + var type = obj.type + + if (!type || typeof type !== 'string' || !TOKEN_REGEXP.test(type)) { + throw new TypeError('invalid type') + } + + // start with normalized type + var string = String(type).toLowerCase() + + // append parameters + if (parameters && typeof parameters === 'object') { + var param + var params = Object.keys(parameters).sort() + + for (var i = 0; i < params.length; i++) { + param = params[i] + + var val = param.substr(-1) === '*' + ? ustring(parameters[param]) + : qstring(parameters[param]) + + string += '; ' + param + '=' + val + } + } + + return string +} + +/** + * Decode a RFC 6987 field value (gracefully). + * + * @param {string} str + * @return {string} + * @api private + */ + +function decodefield (str) { + var match = EXT_VALUE_REGEXP.exec(str) + + if (!match) { + throw new TypeError('invalid extended field value') + } + + var charset = match[1].toLowerCase() + var encoded = match[2] + var value + + // to binary string + var binary = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode) + + switch (charset) { + case 'iso-8859-1': + value = getlatin1(binary) + break + case 'utf-8': + value = new Buffer(binary, 'binary').toString('utf8') + break + default: + throw new TypeError('unsupported charset in extended field') + } + + return value +} + +/** + * Get ISO-8859-1 version of string. + * + * @param {string} val + * @return {string} + * @api private + */ + +function getlatin1 (val) { + // simple Unicode -> ISO-8859-1 transformation + return String(val).replace(NON_LATIN1_REGEXP, '?') +} + +/** + * Parse Content-Disposition header string. + * + * @param {string} string + * @return {object} + * @api private + */ + +function parse (string) { + if (!string || typeof string !== 'string') { + throw new TypeError('argument string is required') + } + + var match = DISPOSITION_TYPE_REGEXP.exec(string) + + if (!match) { + throw new TypeError('invalid type format') + } + + // normalize type + var index = match[0].length + var type = match[1].toLowerCase() + + var key + var names = [] + var params = {} + var value + + // calculate index to start at + index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ';' + ? index - 1 + : index + + // match parameters + while ((match = PARAM_REGEXP.exec(string))) { + if (match.index !== index) { + throw new TypeError('invalid parameter format') + } + + index += match[0].length + key = match[1].toLowerCase() + value = match[2] + + if (names.indexOf(key) !== -1) { + throw new TypeError('invalid duplicate parameter') + } + + names.push(key) + + if (key.indexOf('*') + 1 === key.length) { + // decode extended value + key = key.slice(0, -1) + value = decodefield(value) + + // overwrite existing value + params[key] = value + continue + } + + if (typeof params[key] === 'string') { + continue + } + + if (value[0] === '"') { + // remove quotes and escapes + value = value + .substr(1, value.length - 2) + .replace(QESC_REGEXP, '$1') + } + + params[key] = value + } + + if (index !== -1 && index !== string.length) { + throw new TypeError('invalid parameter format') + } + + return new ContentDisposition(type, params) +} + +/** + * Percent decode a single character. + * + * @param {string} str + * @param {string} hex + * @return {string} + * @api private + */ + +function pdecode (str, hex) { + return String.fromCharCode(parseInt(hex, 16)) +} + +/** + * Percent encode a single character. + * + * @param {string} char + * @return {string} + * @api private + */ + +function pencode (char) { + var hex = String(char) + .charCodeAt(0) + .toString(16) + .toUpperCase() + return hex.length === 1 + ? '%0' + hex + : '%' + hex +} + +/** + * Quote a string for HTTP. + * + * @param {string} val + * @return {string} + * @api private + */ + +function qstring (val) { + var str = String(val) + + return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"' +} + +/** + * Encode a Unicode string for HTTP (RFC 5987). + * + * @param {string} val + * @return {string} + * @api private + */ + +function ustring (val) { + var str = String(val) + + // percent encode as UTF-8 + var encoded = encodeURIComponent(str) + .replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode) + + return 'UTF-8\'\'' + encoded +} + +/** + * Class for parsed Content-Disposition header for v8 optimization + */ + +function ContentDisposition (type, parameters) { + this.type = type + this.parameters = parameters +} diff --git a/Server File/node_modules/content-disposition/package.json b/Server File/node_modules/content-disposition/package.json new file mode 100644 index 0000000..679253b --- /dev/null +++ b/Server File/node_modules/content-disposition/package.json @@ -0,0 +1,110 @@ +{ + "_args": [ + [ + { + "raw": "content-disposition@0.5.2", + "scope": null, + "escapedName": "content-disposition", + "name": "content-disposition", + "rawSpec": "0.5.2", + "spec": "0.5.2", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express" + ] + ], + "_from": "content-disposition@0.5.2", + "_id": "content-disposition@0.5.2", + "_inCache": true, + "_location": "/content-disposition", + "_nodeVersion": "4.6.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/content-disposition-0.5.2.tgz_1481246224565_0.35659545403905213" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "raw": "content-disposition@0.5.2", + "scope": null, + "escapedName": "content-disposition", + "name": "content-disposition", + "rawSpec": "0.5.2", + "spec": "0.5.2", + "type": "version" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "_shasum": "0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4", + "_shrinkwrap": null, + "_spec": "content-disposition@0.5.2", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express", + "bugs": { + "url": "https://github.com/jshttp/content-disposition/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + } + ], + "dependencies": {}, + "description": "Create and parse Content-Disposition header", + "devDependencies": { + "eslint": "3.11.1", + "eslint-config-standard": "6.2.1", + "eslint-plugin-promise": "3.3.0", + "eslint-plugin-standard": "2.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5" + }, + "directories": {}, + "dist": { + "shasum": "0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4", + "tarball": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "gitHead": "2a08417377cf55678c9f870b305f3c6c088920f3", + "homepage": "https://github.com/jshttp/content-disposition#readme", + "keywords": [ + "content-disposition", + "http", + "rfc6266", + "res" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "content-disposition", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/content-disposition.git" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "0.5.2" +} diff --git a/Server File/node_modules/content-type/HISTORY.md b/Server File/node_modules/content-type/HISTORY.md new file mode 100644 index 0000000..01652ff --- /dev/null +++ b/Server File/node_modules/content-type/HISTORY.md @@ -0,0 +1,14 @@ +1.0.2 / 2016-05-09 +================== + + * perf: enable strict mode + +1.0.1 / 2015-02-13 +================== + + * Improve missing `Content-Type` header error message + +1.0.0 / 2015-02-01 +================== + + * Initial implementation, derived from `media-typer@0.3.0` diff --git a/Server File/node_modules/content-type/LICENSE b/Server File/node_modules/content-type/LICENSE new file mode 100644 index 0000000..34b1a2d --- /dev/null +++ b/Server File/node_modules/content-type/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Server File/node_modules/content-type/README.md b/Server File/node_modules/content-type/README.md new file mode 100644 index 0000000..3ed6741 --- /dev/null +++ b/Server File/node_modules/content-type/README.md @@ -0,0 +1,92 @@ +# content-type + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Create and parse HTTP Content-Type header according to RFC 7231 + +## Installation + +```sh +$ npm install content-type +``` + +## API + +```js +var contentType = require('content-type') +``` + +### contentType.parse(string) + +```js +var obj = contentType.parse('image/svg+xml; charset=utf-8') +``` + +Parse a content type string. This will return an object with the following +properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`): + + - `type`: The media type (the type and subtype, always lower case). + Example: `'image/svg+xml'` + + - `parameters`: An object of the parameters in the media type (name of parameter + always lower case). Example: `{charset: 'utf-8'}` + +Throws a `TypeError` if the string is missing or invalid. + +### contentType.parse(req) + +```js +var obj = contentType.parse(req) +``` + +Parse the `content-type` header from the given `req`. Short-cut for +`contentType.parse(req.headers['content-type'])`. + +Throws a `TypeError` if the `Content-Type` header is missing or invalid. + +### contentType.parse(res) + +```js +var obj = contentType.parse(res) +``` + +Parse the `content-type` header set on the given `res`. Short-cut for +`contentType.parse(res.getHeader('content-type'))`. + +Throws a `TypeError` if the `Content-Type` header is missing or invalid. + +### contentType.format(obj) + +```js +var str = contentType.format({type: 'image/svg+xml'}) +``` + +Format an object into a content type string. This will return a string of the +content type for the given object with the following properties (examples are +shown that produce the string `'image/svg+xml; charset=utf-8'`): + + - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'` + + - `parameters`: An object of the parameters in the media type (name of the + parameter will be lower-cased). Example: `{charset: 'utf-8'}` + +Throws a `TypeError` if the object contains an invalid type or parameter names. + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/content-type.svg +[npm-url]: https://npmjs.org/package/content-type +[node-version-image]: https://img.shields.io/node/v/content-type.svg +[node-version-url]: http://nodejs.org/download/ +[travis-image]: https://img.shields.io/travis/jshttp/content-type/master.svg +[travis-url]: https://travis-ci.org/jshttp/content-type +[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-type/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/content-type +[downloads-image]: https://img.shields.io/npm/dm/content-type.svg +[downloads-url]: https://npmjs.org/package/content-type diff --git a/Server File/node_modules/content-type/index.js b/Server File/node_modules/content-type/index.js new file mode 100644 index 0000000..61ba6b5 --- /dev/null +++ b/Server File/node_modules/content-type/index.js @@ -0,0 +1,216 @@ +/*! + * content-type + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1 + * + * parameter = token "=" ( token / quoted-string ) + * token = 1*tchar + * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" + * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" + * / DIGIT / ALPHA + * ; any VCHAR, except delimiters + * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE + * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text + * obs-text = %x80-FF + * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) + */ +var paramRegExp = /; *([!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+) */g +var textRegExp = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/ +var tokenRegExp = /^[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+$/ + +/** + * RegExp to match quoted-pair in RFC 7230 sec 3.2.6 + * + * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) + * obs-text = %x80-FF + */ +var qescRegExp = /\\([\u000b\u0020-\u00ff])/g + +/** + * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6 + */ +var quoteRegExp = /([\\"])/g + +/** + * RegExp to match type in RFC 6838 + * + * media-type = type "/" subtype + * type = token + * subtype = token + */ +var typeRegExp = /^[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+\/[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+$/ + +/** + * Module exports. + * @public + */ + +exports.format = format +exports.parse = parse + +/** + * Format object to media type. + * + * @param {object} obj + * @return {string} + * @public + */ + +function format(obj) { + if (!obj || typeof obj !== 'object') { + throw new TypeError('argument obj is required') + } + + var parameters = obj.parameters + var type = obj.type + + if (!type || !typeRegExp.test(type)) { + throw new TypeError('invalid type') + } + + var string = type + + // append parameters + if (parameters && typeof parameters === 'object') { + var param + var params = Object.keys(parameters).sort() + + for (var i = 0; i < params.length; i++) { + param = params[i] + + if (!tokenRegExp.test(param)) { + throw new TypeError('invalid parameter name') + } + + string += '; ' + param + '=' + qstring(parameters[param]) + } + } + + return string +} + +/** + * Parse media type to object. + * + * @param {string|object} string + * @return {Object} + * @public + */ + +function parse(string) { + if (!string) { + throw new TypeError('argument string is required') + } + + if (typeof string === 'object') { + // support req/res-like objects as argument + string = getcontenttype(string) + + if (typeof string !== 'string') { + throw new TypeError('content-type header is missing from object'); + } + } + + if (typeof string !== 'string') { + throw new TypeError('argument string is required to be a string') + } + + var index = string.indexOf(';') + var type = index !== -1 + ? string.substr(0, index).trim() + : string.trim() + + if (!typeRegExp.test(type)) { + throw new TypeError('invalid media type') + } + + var key + var match + var obj = new ContentType(type.toLowerCase()) + var value + + paramRegExp.lastIndex = index + + while (match = paramRegExp.exec(string)) { + if (match.index !== index) { + throw new TypeError('invalid parameter format') + } + + index += match[0].length + key = match[1].toLowerCase() + value = match[2] + + if (value[0] === '"') { + // remove quotes and escapes + value = value + .substr(1, value.length - 2) + .replace(qescRegExp, '$1') + } + + obj.parameters[key] = value + } + + if (index !== -1 && index !== string.length) { + throw new TypeError('invalid parameter format') + } + + return obj +} + +/** + * Get content-type from req/res objects. + * + * @param {object} + * @return {Object} + * @private + */ + +function getcontenttype(obj) { + if (typeof obj.getHeader === 'function') { + // res-like + return obj.getHeader('content-type') + } + + if (typeof obj.headers === 'object') { + // req-like + return obj.headers && obj.headers['content-type'] + } +} + +/** + * Quote a string if necessary. + * + * @param {string} val + * @return {string} + * @private + */ + +function qstring(val) { + var str = String(val) + + // no need to quote tokens + if (tokenRegExp.test(str)) { + return str + } + + if (str.length > 0 && !textRegExp.test(str)) { + throw new TypeError('invalid parameter value') + } + + return '"' + str.replace(quoteRegExp, '\\$1') + '"' +} + +/** + * Class to represent a content type. + * @private + */ +function ContentType(type) { + this.parameters = Object.create(null) + this.type = type +} diff --git a/Server File/node_modules/content-type/package.json b/Server File/node_modules/content-type/package.json new file mode 100644 index 0000000..ae1705b --- /dev/null +++ b/Server File/node_modules/content-type/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + { + "raw": "content-type@~1.0.2", + "scope": null, + "escapedName": "content-type", + "name": "content-type", + "rawSpec": "~1.0.2", + "spec": ">=1.0.2 <1.1.0", + "type": "range" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express" + ] + ], + "_from": "content-type@>=1.0.2 <1.1.0", + "_id": "content-type@1.0.2", + "_inCache": true, + "_location": "/content-type", + "_nodeVersion": "4.4.3", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/content-type-1.0.2.tgz_1462852785748_0.5491233412176371" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "raw": "content-type@~1.0.2", + "scope": null, + "escapedName": "content-type", + "name": "content-type", + "rawSpec": "~1.0.2", + "spec": ">=1.0.2 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", + "_shasum": "b7d113aee7a8dd27bd21133c4dc2529df1721eed", + "_shrinkwrap": null, + "_spec": "content-type@~1.0.2", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express", + "author": { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + "bugs": { + "url": "https://github.com/jshttp/content-type/issues" + }, + "dependencies": {}, + "description": "Create and parse HTTP Content-Type header", + "devDependencies": { + "istanbul": "0.4.3", + "mocha": "~1.21.5" + }, + "directories": {}, + "dist": { + "shasum": "b7d113aee7a8dd27bd21133c4dc2529df1721eed", + "tarball": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "gitHead": "8118763adfbbac80cf1254191889330aec8b8be7", + "homepage": "https://github.com/jshttp/content-type#readme", + "keywords": [ + "content-type", + "http", + "req", + "res", + "rfc7231" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "content-type", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/content-type.git" + }, + "scripts": { + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" + }, + "version": "1.0.2" +} diff --git a/Server File/node_modules/cookie-signature/.npmignore b/Server File/node_modules/cookie-signature/.npmignore new file mode 100644 index 0000000..f1250e5 --- /dev/null +++ b/Server File/node_modules/cookie-signature/.npmignore @@ -0,0 +1,4 @@ +support +test +examples +*.sock diff --git a/Server File/node_modules/cookie-signature/History.md b/Server File/node_modules/cookie-signature/History.md new file mode 100644 index 0000000..78513cc --- /dev/null +++ b/Server File/node_modules/cookie-signature/History.md @@ -0,0 +1,38 @@ +1.0.6 / 2015-02-03 +================== + +* use `npm test` instead of `make test` to run tests +* clearer assertion messages when checking input + + +1.0.5 / 2014-09-05 +================== + +* add license to package.json + +1.0.4 / 2014-06-25 +================== + + * corrected avoidance of timing attacks (thanks @tenbits!) + +1.0.3 / 2014-01-28 +================== + + * [incorrect] fix for timing attacks + +1.0.2 / 2014-01-28 +================== + + * fix missing repository warning + * fix typo in test + +1.0.1 / 2013-04-15 +================== + + * Revert "Changed underlying HMAC algo. to sha512." + * Revert "Fix for timing attacks on MAC verification." + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/Server File/node_modules/cookie-signature/Readme.md b/Server File/node_modules/cookie-signature/Readme.md new file mode 100644 index 0000000..2559e84 --- /dev/null +++ b/Server File/node_modules/cookie-signature/Readme.md @@ -0,0 +1,42 @@ + +# cookie-signature + + Sign and unsign cookies. + +## Example + +```js +var cookie = require('cookie-signature'); + +var val = cookie.sign('hello', 'tobiiscool'); +val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI'); + +var val = cookie.sign('hello', 'tobiiscool'); +cookie.unsign(val, 'tobiiscool').should.equal('hello'); +cookie.unsign(val, 'luna').should.be.false; +``` + +## License + +(The MIT License) + +Copyright (c) 2012 LearnBoost <tj@learnboost.com> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Server File/node_modules/cookie-signature/index.js b/Server File/node_modules/cookie-signature/index.js new file mode 100644 index 0000000..b8c9463 --- /dev/null +++ b/Server File/node_modules/cookie-signature/index.js @@ -0,0 +1,51 @@ +/** + * Module dependencies. + */ + +var crypto = require('crypto'); + +/** + * Sign the given `val` with `secret`. + * + * @param {String} val + * @param {String} secret + * @return {String} + * @api private + */ + +exports.sign = function(val, secret){ + if ('string' != typeof val) throw new TypeError("Cookie value must be provided as a string."); + if ('string' != typeof secret) throw new TypeError("Secret string must be provided."); + return val + '.' + crypto + .createHmac('sha256', secret) + .update(val) + .digest('base64') + .replace(/\=+$/, ''); +}; + +/** + * Unsign and decode the given `val` with `secret`, + * returning `false` if the signature is invalid. + * + * @param {String} val + * @param {String} secret + * @return {String|Boolean} + * @api private + */ + +exports.unsign = function(val, secret){ + if ('string' != typeof val) throw new TypeError("Signed cookie string must be provided."); + if ('string' != typeof secret) throw new TypeError("Secret string must be provided."); + var str = val.slice(0, val.lastIndexOf('.')) + , mac = exports.sign(str, secret); + + return sha1(mac) == sha1(val) ? str : false; +}; + +/** + * Private + */ + +function sha1(str){ + return crypto.createHash('sha1').update(str).digest('hex'); +} diff --git a/Server File/node_modules/cookie-signature/package.json b/Server File/node_modules/cookie-signature/package.json new file mode 100644 index 0000000..5e3954e --- /dev/null +++ b/Server File/node_modules/cookie-signature/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + { + "raw": "cookie-signature@1.0.6", + "scope": null, + "escapedName": "cookie-signature", + "name": "cookie-signature", + "rawSpec": "1.0.6", + "spec": "1.0.6", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express" + ] + ], + "_from": "cookie-signature@1.0.6", + "_id": "cookie-signature@1.0.6", + "_inCache": true, + "_location": "/cookie-signature", + "_nodeVersion": "0.10.36", + "_npmUser": { + "name": "natevw", + "email": "natevw@yahoo.com" + }, + "_npmVersion": "2.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "cookie-signature@1.0.6", + "scope": null, + "escapedName": "cookie-signature", + "name": "cookie-signature", + "rawSpec": "1.0.6", + "spec": "1.0.6", + "type": "version" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "_shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c", + "_shrinkwrap": null, + "_spec": "cookie-signature@1.0.6", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@learnboost.com" + }, + "bugs": { + "url": "https://github.com/visionmedia/node-cookie-signature/issues" + }, + "dependencies": {}, + "description": "Sign and unsign cookies", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c", + "tarball": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" + }, + "gitHead": "391b56cf44d88c493491b7e3fc53208cfb976d2a", + "homepage": "https://github.com/visionmedia/node-cookie-signature", + "keywords": [ + "cookie", + "sign", + "unsign" + ], + "license": "MIT", + "main": "index", + "maintainers": [ + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + }, + { + "name": "natevw", + "email": "natevw@yahoo.com" + } + ], + "name": "cookie-signature", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/visionmedia/node-cookie-signature.git" + }, + "scripts": { + "test": "mocha --require should --reporter spec" + }, + "version": "1.0.6" +} diff --git a/Server File/node_modules/cookie/HISTORY.md b/Server File/node_modules/cookie/HISTORY.md new file mode 100644 index 0000000..5bd6485 --- /dev/null +++ b/Server File/node_modules/cookie/HISTORY.md @@ -0,0 +1,118 @@ +0.3.1 / 2016-05-26 +================== + + * Fix `sameSite: true` to work with draft-7 clients + - `true` now sends `SameSite=Strict` instead of `SameSite` + +0.3.0 / 2016-05-26 +================== + + * Add `sameSite` option + - Replaces `firstPartyOnly` option, never implemented by browsers + * Improve error message when `encode` is not a function + * Improve error message when `expires` is not a `Date` + +0.2.4 / 2016-05-20 +================== + + * perf: enable strict mode + * perf: use for loop in parse + * perf: use string concatination for serialization + +0.2.3 / 2015-10-25 +================== + + * Fix cookie `Max-Age` to never be a floating point number + +0.2.2 / 2015-09-17 +================== + + * Fix regression when setting empty cookie value + - Ease the new restriction, which is just basic header-level validation + * Fix typo in invalid value errors + +0.2.1 / 2015-09-17 +================== + + * Throw on invalid values provided to `serialize` + - Ensures the resulting string is a valid HTTP header value + +0.2.0 / 2015-08-13 +================== + + * Add `firstPartyOnly` option + * Throw better error for invalid argument to parse + * perf: hoist regular expression + +0.1.5 / 2015-09-17 +================== + + * Fix regression when setting empty cookie value + - Ease the new restriction, which is just basic header-level validation + * Fix typo in invalid value errors + +0.1.4 / 2015-09-17 +================== + + * Throw better error for invalid argument to parse + * Throw on invalid values provided to `serialize` + - Ensures the resulting string is a valid HTTP header value + +0.1.3 / 2015-05-19 +================== + + * Reduce the scope of try-catch deopt + * Remove argument reassignments + +0.1.2 / 2014-04-16 +================== + + * Remove unnecessary files from npm package + +0.1.1 / 2014-02-23 +================== + + * Fix bad parse when cookie value contained a comma + * Fix support for `maxAge` of `0` + +0.1.0 / 2013-05-01 +================== + + * Add `decode` option + * Add `encode` option + +0.0.6 / 2013-04-08 +================== + + * Ignore cookie parts missing `=` + +0.0.5 / 2012-10-29 +================== + + * Return raw cookie value if value unescape errors + +0.0.4 / 2012-06-21 +================== + + * Use encode/decodeURIComponent for cookie encoding/decoding + - Improve server/client interoperability + +0.0.3 / 2012-06-06 +================== + + * Only escape special characters per the cookie RFC + +0.0.2 / 2012-06-01 +================== + + * Fix `maxAge` option to not throw error + +0.0.1 / 2012-05-28 +================== + + * Add more tests + +0.0.0 / 2012-05-28 +================== + + * Initial release diff --git a/Server File/node_modules/cookie/LICENSE b/Server File/node_modules/cookie/LICENSE new file mode 100644 index 0000000..058b6b4 --- /dev/null +++ b/Server File/node_modules/cookie/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2012-2014 Roman Shtylman +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/Server File/node_modules/cookie/README.md b/Server File/node_modules/cookie/README.md new file mode 100644 index 0000000..db0d078 --- /dev/null +++ b/Server File/node_modules/cookie/README.md @@ -0,0 +1,220 @@ +# cookie + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Basic HTTP cookie parser and serializer for HTTP servers. + +## Installation + +```sh +$ npm install cookie +``` + +## API + +```js +var cookie = require('cookie'); +``` + +### cookie.parse(str, options) + +Parse an HTTP `Cookie` header string and returning an object of all cookie name-value pairs. +The `str` argument is the string representing a `Cookie` header value and `options` is an +optional object containing additional parsing options. + +```js +var cookies = cookie.parse('foo=bar; equation=E%3Dmc%5E2'); +// { foo: 'bar', equation: 'E=mc^2' } +``` + +#### Options + +`cookie.parse` accepts these properties in the options object. + +##### decode + +Specifies a function that will be used to decode a cookie's value. Since the value of a cookie +has a limited character set (and must be a simple string), this function can be used to decode +a previously-encoded cookie value into a JavaScript string or other object. + +The default function is the global `decodeURIComponent`, which will decode any URL-encoded +sequences into their byte representations. + +**note** if an error is thrown from this function, the original, non-decoded cookie value will +be returned as the cookie's value. + +### cookie.serialize(name, value, options) + +Serialize a cookie name-value pair into a `Set-Cookie` header string. The `name` argument is the +name for the cookie, the `value` argument is the value to set the cookie to, and the `options` +argument is an optional object containing additional serialization options. + +```js +var setCookie = cookie.serialize('foo', 'bar'); +// foo=bar +``` + +#### Options + +`cookie.serialize` accepts these properties in the options object. + +##### domain + +Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6266-5.2.3]. By default, no +domain is set, and most clients will consider the cookie to apply to only the current domain. + +##### encode + +Specifies a function that will be used to encode a cookie's value. Since value of a cookie +has a limited character set (and must be a simple string), this function can be used to encode +a value into a string suited for a cookie's value. + +The default function is the global `ecodeURIComponent`, which will encode a JavaScript string +into UTF-8 byte sequences and then URL-encode any that fall outside of the cookie range. + +##### expires + +Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6266-5.2.1]. +By default, no expiration is set, and most clients will consider this a "non-persistent cookie" and +will delete it on a condition like exiting a web browser application. + +**note** the [cookie storage model specification][rfc-6266-5.3] states that if both `expires` and +`magAge` are set, then `maxAge` takes precedence, but it is possiblke not all clients by obey this, +so if both are set, they should point to the same date and time. + +##### httpOnly + +Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6266-5.2.6]. When truthy, +the `HttpOnly` attribute is set, otherwise it is not. By default, the `HttpOnly` attribute is not set. + +**note** be careful when setting this to `true`, as compliant clients will not allow client-side +JavaScript to see the cookie in `document.cookie`. + +##### maxAge + +Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6266-5.2.2]. +The given number will be converted to an integer by rounding down. By default, no maximum age is set. + +**note** the [cookie storage model specification][rfc-6266-5.3] states that if both `expires` and +`magAge` are set, then `maxAge` takes precedence, but it is possiblke not all clients by obey this, +so if both are set, they should point to the same date and time. + +##### path + +Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6266-5.2.4]. By default, the path +is considered the ["default path"][rfc-6266-5.1.4]. By default, no maximum age is set, and most +clients will consider this a "non-persistent cookie" and will delete it on a condition like exiting +a web browser application. + +##### sameSite + +Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][draft-west-first-party-cookies-07]. + + - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement. + - `false` will not set the `SameSite` attribute. + - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement. + - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement. + +More information about the different enforcement levels can be found in the specification +https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-4.1.1 + +**note** This is an attribute that has not yet been fully standardized, and may change in the future. +This also means many clients may ignore this attribute until they understand it. + +##### secure + +Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6266-5.2.5]. When truthy, +the `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set. + +**note** be careful when setting this to `true`, as compliant clients will not send the cookie back to +the server in the future if the browser does not have an HTTPS connection. + +## Example + +The following example uses this module in conjunction with the Node.js core HTTP server +to prompt a user for their name and display it back on future visits. + +```js +var cookie = require('cookie'); +var escapeHtml = require('escape-html'); +var http = require('http'); +var url = require('url'); + +function onRequest(req, res) { + // Parse the query string + var query = url.parse(req.url, true, true).query; + + if (query && query.name) { + // Set a new cookie with the name + res.setHeader('Set-Cookie', cookie.serialize('name', String(query.name), { + httpOnly: true, + maxAge: 60 * 60 * 24 * 7 // 1 week + })); + + // Redirect back after setting cookie + res.statusCode = 302; + res.setHeader('Location', req.headers.referer || '/'); + res.end(); + return; + } + + // Parse the cookies on the request + var cookies = cookie.parse(req.headers.cookie || ''); + + // Get the visitor name set in the cookie + var name = cookies.name; + + res.setHeader('Content-Type', 'text/html; charset=UTF-8'); + + if (name) { + res.write('

Welcome back, ' + escapeHtml(name) + '!

'); + } else { + res.write('

Hello, new visitor!

'); + } + + res.write('
'); + res.write(' '); + res.end(' values + * + * @param {string} str + * @param {object} [options] + * @return {object} + * @public + */ + +function parse(str, options) { + if (typeof str !== 'string') { + throw new TypeError('argument str must be a string'); + } + + var obj = {} + var opt = options || {}; + var pairs = str.split(pairSplitRegExp); + var dec = opt.decode || decode; + + for (var i = 0; i < pairs.length; i++) { + var pair = pairs[i]; + var eq_idx = pair.indexOf('='); + + // skip things that don't look like key=value + if (eq_idx < 0) { + continue; + } + + var key = pair.substr(0, eq_idx).trim() + var val = pair.substr(++eq_idx, pair.length).trim(); + + // quoted values + if ('"' == val[0]) { + val = val.slice(1, -1); + } + + // only assign once + if (undefined == obj[key]) { + obj[key] = tryDecode(val, dec); + } + } + + return obj; +} + +/** + * Serialize data into a cookie header. + * + * Serialize the a name value pair into a cookie string suitable for + * http headers. An optional options object specified cookie parameters. + * + * serialize('foo', 'bar', { httpOnly: true }) + * => "foo=bar; httpOnly" + * + * @param {string} name + * @param {string} val + * @param {object} [options] + * @return {string} + * @public + */ + +function serialize(name, val, options) { + var opt = options || {}; + var enc = opt.encode || encode; + + if (typeof enc !== 'function') { + throw new TypeError('option encode is invalid'); + } + + if (!fieldContentRegExp.test(name)) { + throw new TypeError('argument name is invalid'); + } + + var value = enc(val); + + if (value && !fieldContentRegExp.test(value)) { + throw new TypeError('argument val is invalid'); + } + + var str = name + '=' + value; + + if (null != opt.maxAge) { + var maxAge = opt.maxAge - 0; + if (isNaN(maxAge)) throw new Error('maxAge should be a Number'); + str += '; Max-Age=' + Math.floor(maxAge); + } + + if (opt.domain) { + if (!fieldContentRegExp.test(opt.domain)) { + throw new TypeError('option domain is invalid'); + } + + str += '; Domain=' + opt.domain; + } + + if (opt.path) { + if (!fieldContentRegExp.test(opt.path)) { + throw new TypeError('option path is invalid'); + } + + str += '; Path=' + opt.path; + } + + if (opt.expires) { + if (typeof opt.expires.toUTCString !== 'function') { + throw new TypeError('option expires is invalid'); + } + + str += '; Expires=' + opt.expires.toUTCString(); + } + + if (opt.httpOnly) { + str += '; HttpOnly'; + } + + if (opt.secure) { + str += '; Secure'; + } + + if (opt.sameSite) { + var sameSite = typeof opt.sameSite === 'string' + ? opt.sameSite.toLowerCase() : opt.sameSite; + + switch (sameSite) { + case true: + str += '; SameSite=Strict'; + break; + case 'lax': + str += '; SameSite=Lax'; + break; + case 'strict': + str += '; SameSite=Strict'; + break; + default: + throw new TypeError('option sameSite is invalid'); + } + } + + return str; +} + +/** + * Try decoding a string using a decoding function. + * + * @param {string} str + * @param {function} decode + * @private + */ + +function tryDecode(str, decode) { + try { + return decode(str); + } catch (e) { + return str; + } +} diff --git a/Server File/node_modules/cookie/package.json b/Server File/node_modules/cookie/package.json new file mode 100644 index 0000000..3ae3b4a --- /dev/null +++ b/Server File/node_modules/cookie/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "cookie@0.3.1", + "scope": null, + "escapedName": "cookie", + "name": "cookie", + "rawSpec": "0.3.1", + "spec": "0.3.1", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express" + ] + ], + "_from": "cookie@0.3.1", + "_id": "cookie@0.3.1", + "_inCache": true, + "_location": "/cookie", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/cookie-0.3.1.tgz_1464323556714_0.6435900838114321" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "cookie@0.3.1", + "scope": null, + "escapedName": "cookie", + "name": "cookie", + "rawSpec": "0.3.1", + "spec": "0.3.1", + "type": "version" + }, + "_requiredBy": [ + "/engine.io", + "/express" + ], + "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "_shasum": "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb", + "_shrinkwrap": null, + "_spec": "cookie@0.3.1", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express", + "author": { + "name": "Roman Shtylman", + "email": "shtylman@gmail.com" + }, + "bugs": { + "url": "https://github.com/jshttp/cookie/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + } + ], + "dependencies": {}, + "description": "HTTP server cookie parsing and serialization", + "devDependencies": { + "istanbul": "0.4.3", + "mocha": "1.21.5" + }, + "directories": {}, + "dist": { + "shasum": "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb", + "tarball": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "index.js" + ], + "gitHead": "e3c77d497d66c8b8d4b677b8954c1b192a09f0b3", + "homepage": "https://github.com/jshttp/cookie", + "keywords": [ + "cookie", + "cookies" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "cookie", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/cookie.git" + }, + "scripts": { + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" + }, + "version": "0.3.1" +} diff --git a/Server File/node_modules/core-util-is/LICENSE b/Server File/node_modules/core-util-is/LICENSE new file mode 100644 index 0000000..d8d7f94 --- /dev/null +++ b/Server File/node_modules/core-util-is/LICENSE @@ -0,0 +1,19 @@ +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/Server File/node_modules/core-util-is/README.md b/Server File/node_modules/core-util-is/README.md new file mode 100644 index 0000000..5a76b41 --- /dev/null +++ b/Server File/node_modules/core-util-is/README.md @@ -0,0 +1,3 @@ +# core-util-is + +The `util.is*` functions introduced in Node v0.12. diff --git a/Server File/node_modules/core-util-is/float.patch b/Server File/node_modules/core-util-is/float.patch new file mode 100644 index 0000000..a06d5c0 --- /dev/null +++ b/Server File/node_modules/core-util-is/float.patch @@ -0,0 +1,604 @@ +diff --git a/lib/util.js b/lib/util.js +index a03e874..9074e8e 100644 +--- a/lib/util.js ++++ b/lib/util.js +@@ -19,430 +19,6 @@ + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + +-var formatRegExp = /%[sdj%]/g; +-exports.format = function(f) { +- if (!isString(f)) { +- var objects = []; +- for (var i = 0; i < arguments.length; i++) { +- objects.push(inspect(arguments[i])); +- } +- return objects.join(' '); +- } +- +- var i = 1; +- var args = arguments; +- var len = args.length; +- var str = String(f).replace(formatRegExp, function(x) { +- if (x === '%%') return '%'; +- if (i >= len) return x; +- switch (x) { +- case '%s': return String(args[i++]); +- case '%d': return Number(args[i++]); +- case '%j': +- try { +- return JSON.stringify(args[i++]); +- } catch (_) { +- return '[Circular]'; +- } +- default: +- return x; +- } +- }); +- for (var x = args[i]; i < len; x = args[++i]) { +- if (isNull(x) || !isObject(x)) { +- str += ' ' + x; +- } else { +- str += ' ' + inspect(x); +- } +- } +- return str; +-}; +- +- +-// Mark that a method should not be used. +-// Returns a modified function which warns once by default. +-// If --no-deprecation is set, then it is a no-op. +-exports.deprecate = function(fn, msg) { +- // Allow for deprecating things in the process of starting up. +- if (isUndefined(global.process)) { +- return function() { +- return exports.deprecate(fn, msg).apply(this, arguments); +- }; +- } +- +- if (process.noDeprecation === true) { +- return fn; +- } +- +- var warned = false; +- function deprecated() { +- if (!warned) { +- if (process.throwDeprecation) { +- throw new Error(msg); +- } else if (process.traceDeprecation) { +- console.trace(msg); +- } else { +- console.error(msg); +- } +- warned = true; +- } +- return fn.apply(this, arguments); +- } +- +- return deprecated; +-}; +- +- +-var debugs = {}; +-var debugEnviron; +-exports.debuglog = function(set) { +- if (isUndefined(debugEnviron)) +- debugEnviron = process.env.NODE_DEBUG || ''; +- set = set.toUpperCase(); +- if (!debugs[set]) { +- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { +- var pid = process.pid; +- debugs[set] = function() { +- var msg = exports.format.apply(exports, arguments); +- console.error('%s %d: %s', set, pid, msg); +- }; +- } else { +- debugs[set] = function() {}; +- } +- } +- return debugs[set]; +-}; +- +- +-/** +- * Echos the value of a value. Trys to print the value out +- * in the best way possible given the different types. +- * +- * @param {Object} obj The object to print out. +- * @param {Object} opts Optional options object that alters the output. +- */ +-/* legacy: obj, showHidden, depth, colors*/ +-function inspect(obj, opts) { +- // default options +- var ctx = { +- seen: [], +- stylize: stylizeNoColor +- }; +- // legacy... +- if (arguments.length >= 3) ctx.depth = arguments[2]; +- if (arguments.length >= 4) ctx.colors = arguments[3]; +- if (isBoolean(opts)) { +- // legacy... +- ctx.showHidden = opts; +- } else if (opts) { +- // got an "options" object +- exports._extend(ctx, opts); +- } +- // set default options +- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; +- if (isUndefined(ctx.depth)) ctx.depth = 2; +- if (isUndefined(ctx.colors)) ctx.colors = false; +- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; +- if (ctx.colors) ctx.stylize = stylizeWithColor; +- return formatValue(ctx, obj, ctx.depth); +-} +-exports.inspect = inspect; +- +- +-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +-inspect.colors = { +- 'bold' : [1, 22], +- 'italic' : [3, 23], +- 'underline' : [4, 24], +- 'inverse' : [7, 27], +- 'white' : [37, 39], +- 'grey' : [90, 39], +- 'black' : [30, 39], +- 'blue' : [34, 39], +- 'cyan' : [36, 39], +- 'green' : [32, 39], +- 'magenta' : [35, 39], +- 'red' : [31, 39], +- 'yellow' : [33, 39] +-}; +- +-// Don't use 'blue' not visible on cmd.exe +-inspect.styles = { +- 'special': 'cyan', +- 'number': 'yellow', +- 'boolean': 'yellow', +- 'undefined': 'grey', +- 'null': 'bold', +- 'string': 'green', +- 'date': 'magenta', +- // "name": intentionally not styling +- 'regexp': 'red' +-}; +- +- +-function stylizeWithColor(str, styleType) { +- var style = inspect.styles[styleType]; +- +- if (style) { +- return '\u001b[' + inspect.colors[style][0] + 'm' + str + +- '\u001b[' + inspect.colors[style][1] + 'm'; +- } else { +- return str; +- } +-} +- +- +-function stylizeNoColor(str, styleType) { +- return str; +-} +- +- +-function arrayToHash(array) { +- var hash = {}; +- +- array.forEach(function(val, idx) { +- hash[val] = true; +- }); +- +- return hash; +-} +- +- +-function formatValue(ctx, value, recurseTimes) { +- // Provide a hook for user-specified inspect functions. +- // Check that value is an object with an inspect function on it +- if (ctx.customInspect && +- value && +- isFunction(value.inspect) && +- // Filter out the util module, it's inspect function is special +- value.inspect !== exports.inspect && +- // Also filter out any prototype objects using the circular check. +- !(value.constructor && value.constructor.prototype === value)) { +- var ret = value.inspect(recurseTimes, ctx); +- if (!isString(ret)) { +- ret = formatValue(ctx, ret, recurseTimes); +- } +- return ret; +- } +- +- // Primitive types cannot have properties +- var primitive = formatPrimitive(ctx, value); +- if (primitive) { +- return primitive; +- } +- +- // Look up the keys of the object. +- var keys = Object.keys(value); +- var visibleKeys = arrayToHash(keys); +- +- if (ctx.showHidden) { +- keys = Object.getOwnPropertyNames(value); +- } +- +- // Some type of object without properties can be shortcutted. +- if (keys.length === 0) { +- if (isFunction(value)) { +- var name = value.name ? ': ' + value.name : ''; +- return ctx.stylize('[Function' + name + ']', 'special'); +- } +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } +- if (isDate(value)) { +- return ctx.stylize(Date.prototype.toString.call(value), 'date'); +- } +- if (isError(value)) { +- return formatError(value); +- } +- } +- +- var base = '', array = false, braces = ['{', '}']; +- +- // Make Array say that they are Array +- if (isArray(value)) { +- array = true; +- braces = ['[', ']']; +- } +- +- // Make functions say that they are functions +- if (isFunction(value)) { +- var n = value.name ? ': ' + value.name : ''; +- base = ' [Function' + n + ']'; +- } +- +- // Make RegExps say that they are RegExps +- if (isRegExp(value)) { +- base = ' ' + RegExp.prototype.toString.call(value); +- } +- +- // Make dates with properties first say the date +- if (isDate(value)) { +- base = ' ' + Date.prototype.toUTCString.call(value); +- } +- +- // Make error with message first say the error +- if (isError(value)) { +- base = ' ' + formatError(value); +- } +- +- if (keys.length === 0 && (!array || value.length == 0)) { +- return braces[0] + base + braces[1]; +- } +- +- if (recurseTimes < 0) { +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } else { +- return ctx.stylize('[Object]', 'special'); +- } +- } +- +- ctx.seen.push(value); +- +- var output; +- if (array) { +- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); +- } else { +- output = keys.map(function(key) { +- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); +- }); +- } +- +- ctx.seen.pop(); +- +- return reduceToSingleString(output, base, braces); +-} +- +- +-function formatPrimitive(ctx, value) { +- if (isUndefined(value)) +- return ctx.stylize('undefined', 'undefined'); +- if (isString(value)) { +- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') +- .replace(/'/g, "\\'") +- .replace(/\\"/g, '"') + '\''; +- return ctx.stylize(simple, 'string'); +- } +- if (isNumber(value)) { +- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, +- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . +- if (value === 0 && 1 / value < 0) +- return ctx.stylize('-0', 'number'); +- return ctx.stylize('' + value, 'number'); +- } +- if (isBoolean(value)) +- return ctx.stylize('' + value, 'boolean'); +- // For some reason typeof null is "object", so special case here. +- if (isNull(value)) +- return ctx.stylize('null', 'null'); +-} +- +- +-function formatError(value) { +- return '[' + Error.prototype.toString.call(value) + ']'; +-} +- +- +-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { +- var output = []; +- for (var i = 0, l = value.length; i < l; ++i) { +- if (hasOwnProperty(value, String(i))) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- String(i), true)); +- } else { +- output.push(''); +- } +- } +- keys.forEach(function(key) { +- if (!key.match(/^\d+$/)) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- key, true)); +- } +- }); +- return output; +-} +- +- +-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { +- var name, str, desc; +- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; +- if (desc.get) { +- if (desc.set) { +- str = ctx.stylize('[Getter/Setter]', 'special'); +- } else { +- str = ctx.stylize('[Getter]', 'special'); +- } +- } else { +- if (desc.set) { +- str = ctx.stylize('[Setter]', 'special'); +- } +- } +- if (!hasOwnProperty(visibleKeys, key)) { +- name = '[' + key + ']'; +- } +- if (!str) { +- if (ctx.seen.indexOf(desc.value) < 0) { +- if (isNull(recurseTimes)) { +- str = formatValue(ctx, desc.value, null); +- } else { +- str = formatValue(ctx, desc.value, recurseTimes - 1); +- } +- if (str.indexOf('\n') > -1) { +- if (array) { +- str = str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n').substr(2); +- } else { +- str = '\n' + str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n'); +- } +- } +- } else { +- str = ctx.stylize('[Circular]', 'special'); +- } +- } +- if (isUndefined(name)) { +- if (array && key.match(/^\d+$/)) { +- return str; +- } +- name = JSON.stringify('' + key); +- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { +- name = name.substr(1, name.length - 2); +- name = ctx.stylize(name, 'name'); +- } else { +- name = name.replace(/'/g, "\\'") +- .replace(/\\"/g, '"') +- .replace(/(^"|"$)/g, "'"); +- name = ctx.stylize(name, 'string'); +- } +- } +- +- return name + ': ' + str; +-} +- +- +-function reduceToSingleString(output, base, braces) { +- var numLinesEst = 0; +- var length = output.reduce(function(prev, cur) { +- numLinesEst++; +- if (cur.indexOf('\n') >= 0) numLinesEst++; +- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; +- }, 0); +- +- if (length > 60) { +- return braces[0] + +- (base === '' ? '' : base + '\n ') + +- ' ' + +- output.join(',\n ') + +- ' ' + +- braces[1]; +- } +- +- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +-} +- +- + // NOTE: These type checking functions intentionally don't use `instanceof` + // because it is fragile and can be easily faked with `Object.create()`. + function isArray(ar) { +@@ -522,166 +98,10 @@ function isPrimitive(arg) { + exports.isPrimitive = isPrimitive; + + function isBuffer(arg) { +- return arg instanceof Buffer; ++ return Buffer.isBuffer(arg); + } + exports.isBuffer = isBuffer; + + function objectToString(o) { + return Object.prototype.toString.call(o); +-} +- +- +-function pad(n) { +- return n < 10 ? '0' + n.toString(10) : n.toString(10); +-} +- +- +-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', +- 'Oct', 'Nov', 'Dec']; +- +-// 26 Feb 16:19:34 +-function timestamp() { +- var d = new Date(); +- var time = [pad(d.getHours()), +- pad(d.getMinutes()), +- pad(d.getSeconds())].join(':'); +- return [d.getDate(), months[d.getMonth()], time].join(' '); +-} +- +- +-// log is just a thin wrapper to console.log that prepends a timestamp +-exports.log = function() { +- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +-}; +- +- +-/** +- * Inherit the prototype methods from one constructor into another. +- * +- * The Function.prototype.inherits from lang.js rewritten as a standalone +- * function (not on Function.prototype). NOTE: If this file is to be loaded +- * during bootstrapping this function needs to be rewritten using some native +- * functions as prototype setup using normal JavaScript does not work as +- * expected during bootstrapping (see mirror.js in r114903). +- * +- * @param {function} ctor Constructor function which needs to inherit the +- * prototype. +- * @param {function} superCtor Constructor function to inherit prototype from. +- */ +-exports.inherits = function(ctor, superCtor) { +- ctor.super_ = superCtor; +- ctor.prototype = Object.create(superCtor.prototype, { +- constructor: { +- value: ctor, +- enumerable: false, +- writable: true, +- configurable: true +- } +- }); +-}; +- +-exports._extend = function(origin, add) { +- // Don't do anything if add isn't an object +- if (!add || !isObject(add)) return origin; +- +- var keys = Object.keys(add); +- var i = keys.length; +- while (i--) { +- origin[keys[i]] = add[keys[i]]; +- } +- return origin; +-}; +- +-function hasOwnProperty(obj, prop) { +- return Object.prototype.hasOwnProperty.call(obj, prop); +-} +- +- +-// Deprecated old stuff. +- +-exports.p = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- console.error(exports.inspect(arguments[i])); +- } +-}, 'util.p: Use console.error() instead'); +- +- +-exports.exec = exports.deprecate(function() { +- return require('child_process').exec.apply(this, arguments); +-}, 'util.exec is now called `child_process.exec`.'); +- +- +-exports.print = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(String(arguments[i])); +- } +-}, 'util.print: Use console.log instead'); +- +- +-exports.puts = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(arguments[i] + '\n'); +- } +-}, 'util.puts: Use console.log instead'); +- +- +-exports.debug = exports.deprecate(function(x) { +- process.stderr.write('DEBUG: ' + x + '\n'); +-}, 'util.debug: Use console.error instead'); +- +- +-exports.error = exports.deprecate(function(x) { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stderr.write(arguments[i] + '\n'); +- } +-}, 'util.error: Use console.error instead'); +- +- +-exports.pump = exports.deprecate(function(readStream, writeStream, callback) { +- var callbackCalled = false; +- +- function call(a, b, c) { +- if (callback && !callbackCalled) { +- callback(a, b, c); +- callbackCalled = true; +- } +- } +- +- readStream.addListener('data', function(chunk) { +- if (writeStream.write(chunk) === false) readStream.pause(); +- }); +- +- writeStream.addListener('drain', function() { +- readStream.resume(); +- }); +- +- readStream.addListener('end', function() { +- writeStream.end(); +- }); +- +- readStream.addListener('close', function() { +- call(); +- }); +- +- readStream.addListener('error', function(err) { +- writeStream.end(); +- call(err); +- }); +- +- writeStream.addListener('error', function(err) { +- readStream.destroy(); +- call(err); +- }); +-}, 'util.pump(): Use readableStream.pipe() instead'); +- +- +-var uv; +-exports._errnoException = function(err, syscall) { +- if (isUndefined(uv)) uv = process.binding('uv'); +- var errname = uv.errname(err); +- var e = new Error(syscall + ' ' + errname); +- e.code = errname; +- e.errno = errname; +- e.syscall = syscall; +- return e; +-}; ++} \ No newline at end of file diff --git a/Server File/node_modules/core-util-is/lib/util.js b/Server File/node_modules/core-util-is/lib/util.js new file mode 100644 index 0000000..ff4c851 --- /dev/null +++ b/Server File/node_modules/core-util-is/lib/util.js @@ -0,0 +1,107 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} diff --git a/Server File/node_modules/core-util-is/package.json b/Server File/node_modules/core-util-is/package.json new file mode 100644 index 0000000..acaffe6 --- /dev/null +++ b/Server File/node_modules/core-util-is/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + { + "raw": "core-util-is@~1.0.0", + "scope": null, + "escapedName": "core-util-is", + "name": "core-util-is", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\readable-stream" + ] + ], + "_from": "core-util-is@>=1.0.0 <1.1.0", + "_id": "core-util-is@1.0.2", + "_inCache": true, + "_location": "/core-util-is", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "raw": "core-util-is@~1.0.0", + "scope": null, + "escapedName": "core-util-is", + "name": "core-util-is", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "_shrinkwrap": null, + "_spec": "core-util-is@~1.0.0", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\readable-stream", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/core-util-is/issues" + }, + "dependencies": {}, + "description": "The `util.is*` functions introduced in Node v0.12.", + "devDependencies": { + "tap": "^2.3.0" + }, + "directories": {}, + "dist": { + "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "tarball": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", + "homepage": "https://github.com/isaacs/core-util-is#readme", + "keywords": [ + "util", + "isBuffer", + "isArray", + "isNumber", + "isString", + "isRegExp", + "isThis", + "isThat", + "polyfill" + ], + "license": "MIT", + "main": "lib/util.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "core-util-is", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/core-util-is.git" + }, + "scripts": { + "test": "tap test.js" + }, + "version": "1.0.2" +} diff --git a/Server File/node_modules/core-util-is/test.js b/Server File/node_modules/core-util-is/test.js new file mode 100644 index 0000000..1a490c6 --- /dev/null +++ b/Server File/node_modules/core-util-is/test.js @@ -0,0 +1,68 @@ +var assert = require('tap'); + +var t = require('./lib/util'); + +assert.equal(t.isArray([]), true); +assert.equal(t.isArray({}), false); + +assert.equal(t.isBoolean(null), false); +assert.equal(t.isBoolean(true), true); +assert.equal(t.isBoolean(false), true); + +assert.equal(t.isNull(null), true); +assert.equal(t.isNull(undefined), false); +assert.equal(t.isNull(false), false); +assert.equal(t.isNull(), false); + +assert.equal(t.isNullOrUndefined(null), true); +assert.equal(t.isNullOrUndefined(undefined), true); +assert.equal(t.isNullOrUndefined(false), false); +assert.equal(t.isNullOrUndefined(), true); + +assert.equal(t.isNumber(null), false); +assert.equal(t.isNumber('1'), false); +assert.equal(t.isNumber(1), true); + +assert.equal(t.isString(null), false); +assert.equal(t.isString('1'), true); +assert.equal(t.isString(1), false); + +assert.equal(t.isSymbol(null), false); +assert.equal(t.isSymbol('1'), false); +assert.equal(t.isSymbol(1), false); +assert.equal(t.isSymbol(Symbol()), true); + +assert.equal(t.isUndefined(null), false); +assert.equal(t.isUndefined(undefined), true); +assert.equal(t.isUndefined(false), false); +assert.equal(t.isUndefined(), true); + +assert.equal(t.isRegExp(null), false); +assert.equal(t.isRegExp('1'), false); +assert.equal(t.isRegExp(new RegExp()), true); + +assert.equal(t.isObject({}), true); +assert.equal(t.isObject([]), true); +assert.equal(t.isObject(new RegExp()), true); +assert.equal(t.isObject(new Date()), true); + +assert.equal(t.isDate(null), false); +assert.equal(t.isDate('1'), false); +assert.equal(t.isDate(new Date()), true); + +assert.equal(t.isError(null), false); +assert.equal(t.isError({ err: true }), false); +assert.equal(t.isError(new Error()), true); + +assert.equal(t.isFunction(null), false); +assert.equal(t.isFunction({ }), false); +assert.equal(t.isFunction(function() {}), true); + +assert.equal(t.isPrimitive(null), true); +assert.equal(t.isPrimitive(''), true); +assert.equal(t.isPrimitive(0), true); +assert.equal(t.isPrimitive(new Date()), false); + +assert.equal(t.isBuffer(null), false); +assert.equal(t.isBuffer({}), false); +assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/Server File/node_modules/debug/.coveralls.yml b/Server File/node_modules/debug/.coveralls.yml new file mode 100644 index 0000000..20a7068 --- /dev/null +++ b/Server File/node_modules/debug/.coveralls.yml @@ -0,0 +1 @@ +repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/Server File/node_modules/debug/.eslintrc b/Server File/node_modules/debug/.eslintrc new file mode 100644 index 0000000..8a37ae2 --- /dev/null +++ b/Server File/node_modules/debug/.eslintrc @@ -0,0 +1,11 @@ +{ + "env": { + "browser": true, + "node": true + }, + "rules": { + "no-console": 0, + "no-empty": [1, { "allowEmptyCatch": true }] + }, + "extends": "eslint:recommended" +} diff --git a/Server File/node_modules/debug/.npmignore b/Server File/node_modules/debug/.npmignore new file mode 100644 index 0000000..5f60eec --- /dev/null +++ b/Server File/node_modules/debug/.npmignore @@ -0,0 +1,9 @@ +support +test +examples +example +*.sock +dist +yarn.lock +coverage +bower.json diff --git a/Server File/node_modules/debug/.travis.yml b/Server File/node_modules/debug/.travis.yml new file mode 100644 index 0000000..6c6090c --- /dev/null +++ b/Server File/node_modules/debug/.travis.yml @@ -0,0 +1,14 @@ + +language: node_js +node_js: + - "6" + - "5" + - "4" + +install: + - make node_modules + +script: + - make lint + - make test + - make coveralls diff --git a/Server File/node_modules/debug/CHANGELOG.md b/Server File/node_modules/debug/CHANGELOG.md new file mode 100644 index 0000000..189dbc8 --- /dev/null +++ b/Server File/node_modules/debug/CHANGELOG.md @@ -0,0 +1,352 @@ + +2.6.7 / 2017-05-16 +================== + + * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) + * Fix: Inline extend function in node implementation (#452, @dougwilson) + * Docs: Fix typo (#455, @msasad) + +2.6.5 / 2017-04-27 +================== + + * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) + * Misc: clean up browser reference checks (#447, @thebigredgeek) + * Misc: add npm-debug.log to .gitignore (@thebigredgeek) + + +2.6.4 / 2017-04-20 +================== + + * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) + * Chore: ignore bower.json in npm installations. (#437, @joaovieira) + * Misc: update "ms" to v0.7.3 (@tootallnate) + +2.6.3 / 2017-03-13 +================== + + * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) + * Docs: Changelog fix (@thebigredgeek) + +2.6.2 / 2017-03-10 +================== + + * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) + * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) + * Docs: Add Slackin invite badge (@tootallnate) + +2.6.1 / 2017-02-10 +================== + + * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error + * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) + * Fix: IE8 "Expected identifier" error (#414, @vgoma) + * Fix: Namespaces would not disable once enabled (#409, @musikov) + +2.6.0 / 2016-12-28 +================== + + * Fix: added better null pointer checks for browser useColors (@thebigredgeek) + * Improvement: removed explicit `window.debug` export (#404, @tootallnate) + * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) + +2.5.2 / 2016-12-25 +================== + + * Fix: reference error on window within webworkers (#393, @KlausTrainer) + * Docs: fixed README typo (#391, @lurch) + * Docs: added notice about v3 api discussion (@thebigredgeek) + +2.5.1 / 2016-12-20 +================== + + * Fix: babel-core compatibility + +2.5.0 / 2016-12-20 +================== + + * Fix: wrong reference in bower file (@thebigredgeek) + * Fix: webworker compatibility (@thebigredgeek) + * Fix: output formatting issue (#388, @kribblo) + * Fix: babel-loader compatibility (#383, @escwald) + * Misc: removed built asset from repo and publications (@thebigredgeek) + * Misc: moved source files to /src (#378, @yamikuronue) + * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) + * Test: coveralls integration (#378, @yamikuronue) + * Docs: simplified language in the opening paragraph (#373, @yamikuronue) + +2.4.5 / 2016-12-17 +================== + + * Fix: `navigator` undefined in Rhino (#376, @jochenberger) + * Fix: custom log function (#379, @hsiliev) + * Improvement: bit of cleanup + linting fixes (@thebigredgeek) + * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) + * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) + +2.4.4 / 2016-12-14 +================== + + * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) + +2.4.3 / 2016-12-14 +================== + + * Fix: navigation.userAgent error for react native (#364, @escwald) + +2.4.2 / 2016-12-14 +================== + + * Fix: browser colors (#367, @tootallnate) + * Misc: travis ci integration (@thebigredgeek) + * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) + +2.4.1 / 2016-12-13 +================== + + * Fix: typo that broke the package (#356) + +2.4.0 / 2016-12-13 +================== + + * Fix: bower.json references unbuilt src entry point (#342, @justmatt) + * Fix: revert "handle regex special characters" (@tootallnate) + * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) + * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) + * Improvement: allow colors in workers (#335, @botverse) + * Improvement: use same color for same namespace. (#338, @lchenay) + +2.3.3 / 2016-11-09 +================== + + * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) + * Fix: Returning `localStorage` saved values (#331, Levi Thomason) + * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) + +2.3.2 / 2016-11-09 +================== + + * Fix: be super-safe in index.js as well (@TooTallNate) + * Fix: should check whether process exists (Tom Newby) + +2.3.1 / 2016-11-09 +================== + + * Fix: Added electron compatibility (#324, @paulcbetts) + * Improvement: Added performance optimizations (@tootallnate) + * Readme: Corrected PowerShell environment variable example (#252, @gimre) + * Misc: Removed yarn lock file from source control (#321, @fengmk2) + +2.3.0 / 2016-11-07 +================== + + * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) + * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) + * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) + * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) + * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) + * Package: Update "ms" to 0.7.2 (#315, @DevSide) + * Package: removed superfluous version property from bower.json (#207 @kkirsche) + * Readme: fix USE_COLORS to DEBUG_COLORS + * Readme: Doc fixes for format string sugar (#269, @mlucool) + * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) + * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) + * Readme: better docs for browser support (#224, @matthewmueller) + * Tooling: Added yarn integration for development (#317, @thebigredgeek) + * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) + * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) + * Misc: Updated contributors (@thebigredgeek) + +2.2.0 / 2015-05-09 +================== + + * package: update "ms" to v0.7.1 (#202, @dougwilson) + * README: add logging to file example (#193, @DanielOchoa) + * README: fixed a typo (#191, @amir-s) + * browser: expose `storage` (#190, @stephenmathieson) + * Makefile: add a `distclean` target (#189, @stephenmathieson) + +2.1.3 / 2015-03-13 +================== + + * Updated stdout/stderr example (#186) + * Updated example/stdout.js to match debug current behaviour + * Renamed example/stderr.js to stdout.js + * Update Readme.md (#184) + * replace high intensity foreground color for bold (#182, #183) + +2.1.2 / 2015-03-01 +================== + + * dist: recompile + * update "ms" to v0.7.0 + * package: update "browserify" to v9.0.3 + * component: fix "ms.js" repo location + * changed bower package name + * updated documentation about using debug in a browser + * fix: security error on safari (#167, #168, @yields) + +2.1.1 / 2014-12-29 +================== + + * browser: use `typeof` to check for `console` existence + * browser: check for `console.log` truthiness (fix IE 8/9) + * browser: add support for Chrome apps + * Readme: added Windows usage remarks + * Add `bower.json` to properly support bower install + +2.1.0 / 2014-10-15 +================== + + * node: implement `DEBUG_FD` env variable support + * package: update "browserify" to v6.1.0 + * package: add "license" field to package.json (#135, @panuhorsmalahti) + +2.0.0 / 2014-09-01 +================== + + * package: update "browserify" to v5.11.0 + * node: use stderr rather than stdout for logging (#29, @stephenmathieson) + +1.0.4 / 2014-07-15 +================== + + * dist: recompile + * example: remove `console.info()` log usage + * example: add "Content-Type" UTF-8 header to browser example + * browser: place %c marker after the space character + * browser: reset the "content" color via `color: inherit` + * browser: add colors support for Firefox >= v31 + * debug: prefer an instance `log()` function over the global one (#119) + * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) + +1.0.3 / 2014-07-09 +================== + + * Add support for multiple wildcards in namespaces (#122, @seegno) + * browser: fix lint + +1.0.2 / 2014-06-10 +================== + + * browser: update color palette (#113, @gscottolson) + * common: make console logging function configurable (#108, @timoxley) + * node: fix %o colors on old node <= 0.8.x + * Makefile: find node path using shell/which (#109, @timoxley) + +1.0.1 / 2014-06-06 +================== + + * browser: use `removeItem()` to clear localStorage + * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) + * package: add "contributors" section + * node: fix comment typo + * README: list authors + +1.0.0 / 2014-06-04 +================== + + * make ms diff be global, not be scope + * debug: ignore empty strings in enable() + * node: make DEBUG_COLORS able to disable coloring + * *: export the `colors` array + * npmignore: don't publish the `dist` dir + * Makefile: refactor to use browserify + * package: add "browserify" as a dev dependency + * Readme: add Web Inspector Colors section + * node: reset terminal color for the debug content + * node: map "%o" to `util.inspect()` + * browser: map "%j" to `JSON.stringify()` + * debug: add custom "formatters" + * debug: use "ms" module for humanizing the diff + * Readme: add "bash" syntax highlighting + * browser: add Firebug color support + * browser: add colors for WebKit browsers + * node: apply log to `console` + * rewrite: abstract common logic for Node & browsers + * add .jshintrc file + +0.8.1 / 2014-04-14 +================== + + * package: re-add the "component" section + +0.8.0 / 2014-03-30 +================== + + * add `enable()` method for nodejs. Closes #27 + * change from stderr to stdout + * remove unnecessary index.js file + +0.7.4 / 2013-11-13 +================== + + * remove "browserify" key from package.json (fixes something in browserify) + +0.7.3 / 2013-10-30 +================== + + * fix: catch localStorage security error when cookies are blocked (Chrome) + * add debug(err) support. Closes #46 + * add .browser prop to package.json. Closes #42 + +0.7.2 / 2013-02-06 +================== + + * fix package.json + * fix: Mobile Safari (private mode) is broken with debug + * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript + +0.7.1 / 2013-02-05 +================== + + * add repository URL to package.json + * add DEBUG_COLORED to force colored output + * add browserify support + * fix component. Closes #24 + +0.7.0 / 2012-05-04 +================== + + * Added .component to package.json + * Added debug.component.js build + +0.6.0 / 2012-03-16 +================== + + * Added support for "-" prefix in DEBUG [Vinay Pulim] + * Added `.enabled` flag to the node version [TooTallNate] + +0.5.0 / 2012-02-02 +================== + + * Added: humanize diffs. Closes #8 + * Added `debug.disable()` to the CS variant + * Removed padding. Closes #10 + * Fixed: persist client-side variant again. Closes #9 + +0.4.0 / 2012-02-01 +================== + + * Added browser variant support for older browsers [TooTallNate] + * Added `debug.enable('project:*')` to browser variant [TooTallNate] + * Added padding to diff (moved it to the right) + +0.3.0 / 2012-01-26 +================== + + * Added millisecond diff when isatty, otherwise UTC string + +0.2.0 / 2012-01-22 +================== + + * Added wildcard support + +0.1.0 / 2011-12-02 +================== + + * Added: remove colors unless stderr isatty [TooTallNate] + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/Server File/node_modules/debug/LICENSE b/Server File/node_modules/debug/LICENSE new file mode 100644 index 0000000..658c933 --- /dev/null +++ b/Server File/node_modules/debug/LICENSE @@ -0,0 +1,19 @@ +(The MIT License) + +Copyright (c) 2014 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/Server File/node_modules/debug/Makefile b/Server File/node_modules/debug/Makefile new file mode 100644 index 0000000..584da8b --- /dev/null +++ b/Server File/node_modules/debug/Makefile @@ -0,0 +1,50 @@ +# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 +THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) + +# BIN directory +BIN := $(THIS_DIR)/node_modules/.bin + +# Path +PATH := node_modules/.bin:$(PATH) +SHELL := /bin/bash + +# applications +NODE ?= $(shell which node) +YARN ?= $(shell which yarn) +PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) +BROWSERIFY ?= $(NODE) $(BIN)/browserify + +.FORCE: + +install: node_modules + +node_modules: package.json + @NODE_ENV= $(PKG) install + @touch node_modules + +lint: .FORCE + eslint browser.js debug.js index.js node.js + +test-node: .FORCE + istanbul cover node_modules/mocha/bin/_mocha -- test/**.js + +test-browser: .FORCE + mkdir -p dist + + @$(BROWSERIFY) \ + --standalone debug \ + . > dist/debug.js + + karma start --single-run + rimraf dist + +test: .FORCE + concurrently \ + "make test-node" \ + "make test-browser" + +coveralls: + cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + +.PHONY: all install clean distclean diff --git a/Server File/node_modules/debug/README.md b/Server File/node_modules/debug/README.md new file mode 100644 index 0000000..f67be6b --- /dev/null +++ b/Server File/node_modules/debug/README.md @@ -0,0 +1,312 @@ +# debug +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + + + +A tiny node.js debugging utility modelled after node core's debugging technique. + +**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)** + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example _app.js_: + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %s', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example _worker.js_: + +```js +var debug = require('debug')('worker'); + +setInterval(function(){ + debug('doing some work'); +}, 1000); +``` + + The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: + + ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) + + ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) + +#### Windows note + + On Windows the environment variable is set using the `set` command. + + ```cmd + set DEBUG=*,-not_this + ``` + + Note that PowerShell uses different syntax to set environment variables. + + ```cmd + $env:DEBUG = "*,-not_this" + ``` + +Then, run the program to be debugged as usual. + +## Millisecond diff + + When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) + + When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: + + ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) + +## Conventions + + If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". + +## Wildcards + + The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + + You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". + +## Environment Variables + + When running through Node.js, you can set a few environment variables that will + change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + + __Note:__ The environment variables beginning with `DEBUG_` end up being + converted into an Options object that gets used with `%o`/`%O` formatters. + See the Node.js documentation for + [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) + for the complete list. + +## Formatters + + + Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + +### Custom formatters + + You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + +## Browser support + You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), + or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), + if you don't want to build it yourself. + + Debug's enable state is currently persisted by `localStorage`. + Consider the situation shown below where you have `worker:a` and `worker:b`, + and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + +#### Web Inspector Colors + + Colors are also enabled on "Web Inspectors" that understand the `%c` formatting + option. These are WebKit web inspectors, Firefox ([since version + 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) + and the Firebug plugin for Firefox (any version). + + Colored output looks something like: + + ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example _stdout.js_: + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + +## Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## License + +(The MIT License) + +Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Server File/node_modules/debug/component.json b/Server File/node_modules/debug/component.json new file mode 100644 index 0000000..d7118d2 --- /dev/null +++ b/Server File/node_modules/debug/component.json @@ -0,0 +1,19 @@ +{ + "name": "debug", + "repo": "visionmedia/debug", + "description": "small debugging utility", + "version": "2.6.7", + "keywords": [ + "debug", + "log", + "debugger" + ], + "main": "src/browser.js", + "scripts": [ + "src/browser.js", + "src/debug.js" + ], + "dependencies": { + "rauchg/ms.js": "0.7.1" + } +} diff --git a/Server File/node_modules/debug/karma.conf.js b/Server File/node_modules/debug/karma.conf.js new file mode 100644 index 0000000..103a82d --- /dev/null +++ b/Server File/node_modules/debug/karma.conf.js @@ -0,0 +1,70 @@ +// Karma configuration +// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) + +module.exports = function(config) { + config.set({ + + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', + + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['mocha', 'chai', 'sinon'], + + + // list of files / patterns to load in the browser + files: [ + 'dist/debug.js', + 'test/*spec.js' + ], + + + // list of files to exclude + exclude: [ + 'src/node.js' + ], + + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + }, + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['progress'], + + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: ['PhantomJS'], + + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: Infinity + }) +} diff --git a/Server File/node_modules/debug/node.js b/Server File/node_modules/debug/node.js new file mode 100644 index 0000000..7fc36fe --- /dev/null +++ b/Server File/node_modules/debug/node.js @@ -0,0 +1 @@ +module.exports = require('./src/node'); diff --git a/Server File/node_modules/debug/package.json b/Server File/node_modules/debug/package.json new file mode 100644 index 0000000..4caf34c --- /dev/null +++ b/Server File/node_modules/debug/package.json @@ -0,0 +1,131 @@ +{ + "_args": [ + [ + { + "raw": "debug@2.6.7", + "scope": null, + "escapedName": "debug", + "name": "debug", + "rawSpec": "2.6.7", + "spec": "2.6.7", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express" + ] + ], + "_from": "debug@2.6.7", + "_id": "debug@2.6.7", + "_inCache": true, + "_location": "/debug", + "_nodeVersion": "6.9.5", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/debug-2.6.7.tgz_1494995629479_0.5576471360400319" + }, + "_npmUser": { + "name": "thebigredgeek", + "email": "rhyneandrew@gmail.com" + }, + "_npmVersion": "3.10.10", + "_phantomChildren": {}, + "_requested": { + "raw": "debug@2.6.7", + "scope": null, + "escapedName": "debug", + "name": "debug", + "rawSpec": "2.6.7", + "spec": "2.6.7", + "type": "version" + }, + "_requiredBy": [ + "/engine.io", + "/engine.io-client", + "/express", + "/finalhandler", + "/send", + "/socket.io", + "/socket.io-client", + "/socket.io-parser" + ], + "_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", + "_shasum": "92bad1f6d05bbb6bba22cca88bcd0ec894c2861e", + "_shrinkwrap": null, + "_spec": "debug@2.6.7", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "browser": "./src/browser.js", + "bugs": { + "url": "https://github.com/visionmedia/debug/issues" + }, + "component": { + "scripts": { + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" + } + }, + "contributors": [ + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io" + }, + { + "name": "Andrew Rhyne", + "email": "rhyneandrew@gmail.com" + } + ], + "dependencies": { + "ms": "2.0.0" + }, + "description": "small debugging utility", + "devDependencies": { + "browserify": "9.0.3", + "chai": "^3.5.0", + "concurrently": "^3.1.0", + "coveralls": "^2.11.15", + "eslint": "^3.12.1", + "istanbul": "^0.4.5", + "karma": "^1.3.0", + "karma-chai": "^0.1.0", + "karma-mocha": "^1.3.0", + "karma-phantomjs-launcher": "^1.0.2", + "karma-sinon": "^1.0.5", + "mocha": "^3.2.0", + "mocha-lcov-reporter": "^1.2.0", + "rimraf": "^2.5.4", + "sinon": "^1.17.6", + "sinon-chai": "^2.8.0" + }, + "directories": {}, + "dist": { + "shasum": "92bad1f6d05bbb6bba22cca88bcd0ec894c2861e", + "tarball": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz" + }, + "gitHead": "6bb07f7e1bafa33631d8f36a779f17eb8abf5fea", + "homepage": "https://github.com/visionmedia/debug#readme", + "keywords": [ + "debug", + "log", + "debugger" + ], + "license": "MIT", + "main": "./src/index.js", + "maintainers": [ + { + "name": "thebigredgeek", + "email": "rhyneandrew@gmail.com" + } + ], + "name": "debug", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "scripts": {}, + "version": "2.6.7" +} diff --git a/Server File/node_modules/debug/src/browser.js b/Server File/node_modules/debug/src/browser.js new file mode 100644 index 0000000..7978ce7 --- /dev/null +++ b/Server File/node_modules/debug/src/browser.js @@ -0,0 +1,185 @@ +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (window && window.process && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (window && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit') + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + return window.localStorage; + } catch (e) {} +} diff --git a/Server File/node_modules/debug/src/debug.js b/Server File/node_modules/debug/src/debug.js new file mode 100644 index 0000000..6a5e3fc --- /dev/null +++ b/Server File/node_modules/debug/src/debug.js @@ -0,0 +1,202 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = require('ms'); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.skips = []; + +/** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + +exports.formatters = {}; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + +function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} diff --git a/Server File/node_modules/debug/src/index.js b/Server File/node_modules/debug/src/index.js new file mode 100644 index 0000000..e12cf4d --- /dev/null +++ b/Server File/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer process, which is node, but we should + * treat as a browser. + */ + +if (typeof process !== 'undefined' && process.type === 'renderer') { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/Server File/node_modules/debug/src/node.js b/Server File/node_modules/debug/src/node.js new file mode 100644 index 0000000..af61297 --- /dev/null +++ b/Server File/node_modules/debug/src/node.js @@ -0,0 +1,246 @@ +/** + * Module dependencies. + */ + +var tty = require('tty'); +var util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(function (key) { + return /^debug_/i.test(key); +}).reduce(function (obj, key) { + // camel-case + var prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); + + // coerce string value into JS value + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) val = true; + else if (/^(no|off|false|disabled)$/i.test(val)) val = false; + else if (val === 'null') val = null; + else val = Number(val); + + obj[prop] = val; + return obj; +}, {}); + +/** + * The file descriptor to write the `debug()` calls to. + * Set the `DEBUG_FD` env variable to override with another value. i.e.: + * + * $ DEBUG_FD=3 node script.js 3>debug.log + */ + +var fd = parseInt(process.env.DEBUG_FD, 10) || 2; + +if (1 !== fd && 2 !== fd) { + util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() +} + +var stream = 1 === fd ? process.stdout : + 2 === fd ? process.stderr : + createWritableStdioStream(fd); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts + ? Boolean(exports.inspectOpts.colors) + : tty.isatty(fd); +} + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +exports.formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .replace(/\s*\n\s*/g, ' '); +}; + +/** + * Map %o to `util.inspect()`, allowing multiple lines if needed. + */ + +exports.formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + var name = this.namespace; + var useColors = this.useColors; + + if (useColors) { + var c = this.color; + var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); + } else { + args[0] = new Date().toUTCString() + + ' ' + name + ' ' + args[0]; + } +} + +/** + * Invokes `util.format()` with the specified arguments and writes to `stream`. + */ + +function log() { + return stream.write(util.format.apply(util, arguments) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + if (null == namespaces) { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Copied from `node/src/node.js`. + * + * XXX: It's lame that node doesn't expose this API out-of-the-box. It also + * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. + */ + +function createWritableStdioStream (fd) { + var stream; + var tty_wrap = process.binding('tty_wrap'); + + // Note stream._type is used for test-module-load-list.js + + switch (tty_wrap.guessHandleType(fd)) { + case 'TTY': + stream = new tty.WriteStream(fd); + stream._type = 'tty'; + + // Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + case 'FILE': + var fs = require('fs'); + stream = new fs.SyncWriteStream(fd, { autoClose: false }); + stream._type = 'fs'; + break; + + case 'PIPE': + case 'TCP': + var net = require('net'); + stream = new net.Socket({ + fd: fd, + readable: false, + writable: true + }); + + // FIXME Should probably have an option in net.Socket to create a + // stream from an existing fd which is writable only. But for now + // we'll just add this hack and set the `readable` member to false. + // Test: ./node test/fixtures/echo.js < /etc/passwd + stream.readable = false; + stream.read = null; + stream._type = 'pipe'; + + // FIXME Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + default: + // Probably an error on in uv_guess_handle() + throw new Error('Implement me. Unknown stream file type!'); + } + + // For supporting legacy API we put the FD here. + stream.fd = fd; + + stream._isStdio = true; + + return stream; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init (debug) { + debug.inspectOpts = {}; + + var keys = Object.keys(exports.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +/** + * Enable namespaces listed in `process.env.DEBUG` initially. + */ + +exports.enable(load()); diff --git a/Server File/node_modules/depd/History.md b/Server File/node_modules/depd/History.md new file mode 100644 index 0000000..ace1171 --- /dev/null +++ b/Server File/node_modules/depd/History.md @@ -0,0 +1,84 @@ +1.1.0 / 2015-09-14 +================== + + * Enable strict mode in more places + * Support io.js 3.x + * Support io.js 2.x + * Support web browser loading + - Requires bundler like Browserify or webpack + +1.0.1 / 2015-04-07 +================== + + * Fix `TypeError`s when under `'use strict'` code + * Fix useless type name on auto-generated messages + * Support io.js 1.x + * Support Node.js 0.12 + +1.0.0 / 2014-09-17 +================== + + * No changes + +0.4.5 / 2014-09-09 +================== + + * Improve call speed to functions using the function wrapper + * Support Node.js 0.6 + +0.4.4 / 2014-07-27 +================== + + * Work-around v8 generating empty stack traces + +0.4.3 / 2014-07-26 +================== + + * Fix exception when global `Error.stackTraceLimit` is too low + +0.4.2 / 2014-07-19 +================== + + * Correct call site for wrapped functions and properties + +0.4.1 / 2014-07-19 +================== + + * Improve automatic message generation for function properties + +0.4.0 / 2014-07-19 +================== + + * Add `TRACE_DEPRECATION` environment variable + * Remove non-standard grey color from color output + * Support `--no-deprecation` argument + * Support `--trace-deprecation` argument + * Support `deprecate.property(fn, prop, message)` + +0.3.0 / 2014-06-16 +================== + + * Add `NO_DEPRECATION` environment variable + +0.2.0 / 2014-06-15 +================== + + * Add `deprecate.property(obj, prop, message)` + * Remove `supports-color` dependency for node.js 0.8 + +0.1.0 / 2014-06-15 +================== + + * Add `deprecate.function(fn, message)` + * Add `process.on('deprecation', fn)` emitter + * Automatically generate message when omitted from `deprecate()` + +0.0.1 / 2014-06-15 +================== + + * Fix warning for dynamic calls at singe call site + +0.0.0 / 2014-06-15 +================== + + * Initial implementation diff --git a/Server File/node_modules/depd/LICENSE b/Server File/node_modules/depd/LICENSE new file mode 100644 index 0000000..142ede3 --- /dev/null +++ b/Server File/node_modules/depd/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Server File/node_modules/depd/Readme.md b/Server File/node_modules/depd/Readme.md new file mode 100644 index 0000000..09bb979 --- /dev/null +++ b/Server File/node_modules/depd/Readme.md @@ -0,0 +1,281 @@ +# depd + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Linux Build][travis-image]][travis-url] +[![Windows Build][appveyor-image]][appveyor-url] +[![Coverage Status][coveralls-image]][coveralls-url] +[![Gratipay][gratipay-image]][gratipay-url] + +Deprecate all the things + +> With great modules comes great responsibility; mark things deprecated! + +## Install + +This module is installed directly using `npm`: + +```sh +$ npm install depd +``` + +This module can also be bundled with systems like +[Browserify](http://browserify.org/) or [webpack](https://webpack.github.io/), +though by default this module will alter it's API to no longer display or +track deprecations. + +## API + +```js +var deprecate = require('depd')('my-module') +``` + +This library allows you to display deprecation messages to your users. +This library goes above and beyond with deprecation warnings by +introspection of the call stack (but only the bits that it is interested +in). + +Instead of just warning on the first invocation of a deprecated +function and never again, this module will warn on the first invocation +of a deprecated function per unique call site, making it ideal to alert +users of all deprecated uses across the code base, rather than just +whatever happens to execute first. + +The deprecation warnings from this module also include the file and line +information for the call into the module that the deprecated function was +in. + +**NOTE** this library has a similar interface to the `debug` module, and +this module uses the calling file to get the boundary for the call stacks, +so you should always create a new `deprecate` object in each file and not +within some central file. + +### depd(namespace) + +Create a new deprecate function that uses the given namespace name in the +messages and will display the call site prior to the stack entering the +file this function was called from. It is highly suggested you use the +name of your module as the namespace. + +### deprecate(message) + +Call this function from deprecated code to display a deprecation message. +This message will appear once per unique caller site. Caller site is the +first call site in the stack in a different file from the caller of this +function. + +If the message is omitted, a message is generated for you based on the site +of the `deprecate()` call and will display the name of the function called, +similar to the name displayed in a stack trace. + +### deprecate.function(fn, message) + +Call this function to wrap a given function in a deprecation message on any +call to the function. An optional message can be supplied to provide a custom +message. + +### deprecate.property(obj, prop, message) + +Call this function to wrap a given property on object in a deprecation message +on any accessing or setting of the property. An optional message can be supplied +to provide a custom message. + +The method must be called on the object where the property belongs (not +inherited from the prototype). + +If the property is a data descriptor, it will be converted to an accessor +descriptor in order to display the deprecation message. + +### process.on('deprecation', fn) + +This module will allow easy capturing of deprecation errors by emitting the +errors as the type "deprecation" on the global `process`. If there are no +listeners for this type, the errors are written to STDERR as normal, but if +there are any listeners, nothing will be written to STDERR and instead only +emitted. From there, you can write the errors in a different format or to a +logging source. + +The error represents the deprecation and is emitted only once with the same +rules as writing to STDERR. The error has the following properties: + + - `message` - This is the message given by the library + - `name` - This is always `'DeprecationError'` + - `namespace` - This is the namespace the deprecation came from + - `stack` - This is the stack of the call to the deprecated thing + +Example `error.stack` output: + +``` +DeprecationError: my-cool-module deprecated oldfunction + at Object. ([eval]-wrapper:6:22) + at Module._compile (module.js:456:26) + at evalScript (node.js:532:25) + at startup (node.js:80:7) + at node.js:902:3 +``` + +### process.env.NO_DEPRECATION + +As a user of modules that are deprecated, the environment variable `NO_DEPRECATION` +is provided as a quick solution to silencing deprecation warnings from being +output. The format of this is similar to that of `DEBUG`: + +```sh +$ NO_DEPRECATION=my-module,othermod node app.js +``` + +This will suppress deprecations from being output for "my-module" and "othermod". +The value is a list of comma-separated namespaces. To suppress every warning +across all namespaces, use the value `*` for a namespace. + +Providing the argument `--no-deprecation` to the `node` executable will suppress +all deprecations (only available in Node.js 0.8 or higher). + +**NOTE** This will not suppress the deperecations given to any "deprecation" +event listeners, just the output to STDERR. + +### process.env.TRACE_DEPRECATION + +As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION` +is provided as a solution to getting more detailed location information in deprecation +warnings by including the entire stack trace. The format of this is the same as +`NO_DEPRECATION`: + +```sh +$ TRACE_DEPRECATION=my-module,othermod node app.js +``` + +This will include stack traces for deprecations being output for "my-module" and +"othermod". The value is a list of comma-separated namespaces. To trace every +warning across all namespaces, use the value `*` for a namespace. + +Providing the argument `--trace-deprecation` to the `node` executable will trace +all deprecations (only available in Node.js 0.8 or higher). + +**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`. + +## Display + +![message](files/message.png) + +When a user calls a function in your library that you mark deprecated, they +will see the following written to STDERR (in the given colors, similar colors +and layout to the `debug` module): + +``` +bright cyan bright yellow +| | reset cyan +| | | | +▼ ▼ ▼ ▼ +my-cool-module deprecated oldfunction [eval]-wrapper:6:22 +▲ ▲ ▲ ▲ +| | | | +namespace | | location of mycoolmod.oldfunction() call + | deprecation message + the word "deprecated" +``` + +If the user redirects their STDERR to a file or somewhere that does not support +colors, they see (similar layout to the `debug` module): + +``` +Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22 +▲ ▲ ▲ ▲ ▲ +| | | | | +timestamp of message namespace | | location of mycoolmod.oldfunction() call + | deprecation message + the word "deprecated" +``` + +## Examples + +### Deprecating all calls to a function + +This will display a deprecated message about "oldfunction" being deprecated +from "my-module" on STDERR. + +```js +var deprecate = require('depd')('my-cool-module') + +// message automatically derived from function name +// Object.oldfunction +exports.oldfunction = deprecate.function(function oldfunction() { + // all calls to function are deprecated +}) + +// specific message +exports.oldfunction = deprecate.function(function () { + // all calls to function are deprecated +}, 'oldfunction') +``` + +### Conditionally deprecating a function call + +This will display a deprecated message about "weirdfunction" being deprecated +from "my-module" on STDERR when called with less than 2 arguments. + +```js +var deprecate = require('depd')('my-cool-module') + +exports.weirdfunction = function () { + if (arguments.length < 2) { + // calls with 0 or 1 args are deprecated + deprecate('weirdfunction args < 2') + } +} +``` + +When calling `deprecate` as a function, the warning is counted per call site +within your own module, so you can display different deprecations depending +on different situations and the users will still get all the warnings: + +```js +var deprecate = require('depd')('my-cool-module') + +exports.weirdfunction = function () { + if (arguments.length < 2) { + // calls with 0 or 1 args are deprecated + deprecate('weirdfunction args < 2') + } else if (typeof arguments[0] !== 'string') { + // calls with non-string first argument are deprecated + deprecate('weirdfunction non-string first arg') + } +} +``` + +### Deprecating property access + +This will display a deprecated message about "oldprop" being deprecated +from "my-module" on STDERR when accessed. A deprecation will be displayed +when setting the value and when getting the value. + +```js +var deprecate = require('depd')('my-cool-module') + +exports.oldprop = 'something' + +// message automatically derives from property name +deprecate.property(exports, 'oldprop') + +// explicit message +deprecate.property(exports, 'oldprop', 'oldprop >= 0.10') +``` + +## License + +[MIT](LICENSE) + +[npm-version-image]: https://img.shields.io/npm/v/depd.svg +[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg +[npm-url]: https://npmjs.org/package/depd +[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd/master.svg?label=linux +[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd +[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/nodejs-depd/master.svg?label=windows +[appveyor-url]: https://ci.appveyor.com/project/dougwilson/nodejs-depd +[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd/master.svg +[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master +[node-image]: https://img.shields.io/node/v/depd.svg +[node-url]: http://nodejs.org/download/ +[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg +[gratipay-url]: https://www.gratipay.com/dougwilson/ diff --git a/Server File/node_modules/depd/index.js b/Server File/node_modules/depd/index.js new file mode 100644 index 0000000..fddcae8 --- /dev/null +++ b/Server File/node_modules/depd/index.js @@ -0,0 +1,521 @@ +/*! + * depd + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module dependencies. + */ + +var callSiteToString = require('./lib/compat').callSiteToString +var eventListenerCount = require('./lib/compat').eventListenerCount +var relative = require('path').relative + +/** + * Module exports. + */ + +module.exports = depd + +/** + * Get the path to base files on. + */ + +var basePath = process.cwd() + +/** + * Determine if namespace is contained in the string. + */ + +function containsNamespace(str, namespace) { + var val = str.split(/[ ,]+/) + + namespace = String(namespace).toLowerCase() + + for (var i = 0 ; i < val.length; i++) { + if (!(str = val[i])) continue; + + // namespace contained + if (str === '*' || str.toLowerCase() === namespace) { + return true + } + } + + return false +} + +/** + * Convert a data descriptor to accessor descriptor. + */ + +function convertDataDescriptorToAccessor(obj, prop, message) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + var value = descriptor.value + + descriptor.get = function getter() { return value } + + if (descriptor.writable) { + descriptor.set = function setter(val) { return value = val } + } + + delete descriptor.value + delete descriptor.writable + + Object.defineProperty(obj, prop, descriptor) + + return descriptor +} + +/** + * Create arguments string to keep arity. + */ + +function createArgumentsString(arity) { + var str = '' + + for (var i = 0; i < arity; i++) { + str += ', arg' + i + } + + return str.substr(2) +} + +/** + * Create stack string from stack. + */ + +function createStackString(stack) { + var str = this.name + ': ' + this.namespace + + if (this.message) { + str += ' deprecated ' + this.message + } + + for (var i = 0; i < stack.length; i++) { + str += '\n at ' + callSiteToString(stack[i]) + } + + return str +} + +/** + * Create deprecate for namespace in caller. + */ + +function depd(namespace) { + if (!namespace) { + throw new TypeError('argument namespace is required') + } + + var stack = getStack() + var site = callSiteLocation(stack[1]) + var file = site[0] + + function deprecate(message) { + // call to self as log + log.call(deprecate, message) + } + + deprecate._file = file + deprecate._ignored = isignored(namespace) + deprecate._namespace = namespace + deprecate._traced = istraced(namespace) + deprecate._warned = Object.create(null) + + deprecate.function = wrapfunction + deprecate.property = wrapproperty + + return deprecate +} + +/** + * Determine if namespace is ignored. + */ + +function isignored(namespace) { + /* istanbul ignore next: tested in a child processs */ + if (process.noDeprecation) { + // --no-deprecation support + return true + } + + var str = process.env.NO_DEPRECATION || '' + + // namespace ignored + return containsNamespace(str, namespace) +} + +/** + * Determine if namespace is traced. + */ + +function istraced(namespace) { + /* istanbul ignore next: tested in a child processs */ + if (process.traceDeprecation) { + // --trace-deprecation support + return true + } + + var str = process.env.TRACE_DEPRECATION || '' + + // namespace traced + return containsNamespace(str, namespace) +} + +/** + * Display deprecation message. + */ + +function log(message, site) { + var haslisteners = eventListenerCount(process, 'deprecation') !== 0 + + // abort early if no destination + if (!haslisteners && this._ignored) { + return + } + + var caller + var callFile + var callSite + var i = 0 + var seen = false + var stack = getStack() + var file = this._file + + if (site) { + // provided site + callSite = callSiteLocation(stack[1]) + callSite.name = site.name + file = callSite[0] + } else { + // get call site + i = 2 + site = callSiteLocation(stack[i]) + callSite = site + } + + // get caller of deprecated thing in relation to file + for (; i < stack.length; i++) { + caller = callSiteLocation(stack[i]) + callFile = caller[0] + + if (callFile === file) { + seen = true + } else if (callFile === this._file) { + file = this._file + } else if (seen) { + break + } + } + + var key = caller + ? site.join(':') + '__' + caller.join(':') + : undefined + + if (key !== undefined && key in this._warned) { + // already warned + return + } + + this._warned[key] = true + + // generate automatic message from call site + if (!message) { + message = callSite === site || !callSite.name + ? defaultMessage(site) + : defaultMessage(callSite) + } + + // emit deprecation if listeners exist + if (haslisteners) { + var err = DeprecationError(this._namespace, message, stack.slice(i)) + process.emit('deprecation', err) + return + } + + // format and write message + var format = process.stderr.isTTY + ? formatColor + : formatPlain + var msg = format.call(this, message, caller, stack.slice(i)) + process.stderr.write(msg + '\n', 'utf8') + + return +} + +/** + * Get call site location as array. + */ + +function callSiteLocation(callSite) { + var file = callSite.getFileName() || '' + var line = callSite.getLineNumber() + var colm = callSite.getColumnNumber() + + if (callSite.isEval()) { + file = callSite.getEvalOrigin() + ', ' + file + } + + var site = [file, line, colm] + + site.callSite = callSite + site.name = callSite.getFunctionName() + + return site +} + +/** + * Generate a default message from the site. + */ + +function defaultMessage(site) { + var callSite = site.callSite + var funcName = site.name + + // make useful anonymous name + if (!funcName) { + funcName = '' + } + + var context = callSite.getThis() + var typeName = context && callSite.getTypeName() + + // ignore useless type name + if (typeName === 'Object') { + typeName = undefined + } + + // make useful type name + if (typeName === 'Function') { + typeName = context.name || typeName + } + + return typeName && callSite.getMethodName() + ? typeName + '.' + funcName + : funcName +} + +/** + * Format deprecation message without color. + */ + +function formatPlain(msg, caller, stack) { + var timestamp = new Date().toUTCString() + + var formatted = timestamp + + ' ' + this._namespace + + ' deprecated ' + msg + + // add stack trace + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += '\n at ' + callSiteToString(stack[i]) + } + + return formatted + } + + if (caller) { + formatted += ' at ' + formatLocation(caller) + } + + return formatted +} + +/** + * Format deprecation message with color. + */ + +function formatColor(msg, caller, stack) { + var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' // bold cyan + + ' \x1b[33;1mdeprecated\x1b[22;39m' // bold yellow + + ' \x1b[0m' + msg + '\x1b[39m' // reset + + // add stack trace + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan + } + + return formatted + } + + if (caller) { + formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan + } + + return formatted +} + +/** + * Format call site location. + */ + +function formatLocation(callSite) { + return relative(basePath, callSite[0]) + + ':' + callSite[1] + + ':' + callSite[2] +} + +/** + * Get the stack as array of call sites. + */ + +function getStack() { + var limit = Error.stackTraceLimit + var obj = {} + var prep = Error.prepareStackTrace + + Error.prepareStackTrace = prepareObjectStackTrace + Error.stackTraceLimit = Math.max(10, limit) + + // capture the stack + Error.captureStackTrace(obj) + + // slice this function off the top + var stack = obj.stack.slice(1) + + Error.prepareStackTrace = prep + Error.stackTraceLimit = limit + + return stack +} + +/** + * Capture call site stack from v8. + */ + +function prepareObjectStackTrace(obj, stack) { + return stack +} + +/** + * Return a wrapped function in a deprecation message. + */ + +function wrapfunction(fn, message) { + if (typeof fn !== 'function') { + throw new TypeError('argument fn must be a function') + } + + var args = createArgumentsString(fn.length) + var deprecate = this + var stack = getStack() + var site = callSiteLocation(stack[1]) + + site.name = fn.name + + var deprecatedfn = eval('(function (' + args + ') {\n' + + '"use strict"\n' + + 'log.call(deprecate, message, site)\n' + + 'return fn.apply(this, arguments)\n' + + '})') + + return deprecatedfn +} + +/** + * Wrap property in a deprecation message. + */ + +function wrapproperty(obj, prop, message) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new TypeError('argument obj must be object') + } + + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + + if (!descriptor) { + throw new TypeError('must call property on owner object') + } + + if (!descriptor.configurable) { + throw new TypeError('property must be configurable') + } + + var deprecate = this + var stack = getStack() + var site = callSiteLocation(stack[1]) + + // set site name + site.name = prop + + // convert data descriptor + if ('value' in descriptor) { + descriptor = convertDataDescriptorToAccessor(obj, prop, message) + } + + var get = descriptor.get + var set = descriptor.set + + // wrap getter + if (typeof get === 'function') { + descriptor.get = function getter() { + log.call(deprecate, message, site) + return get.apply(this, arguments) + } + } + + // wrap setter + if (typeof set === 'function') { + descriptor.set = function setter() { + log.call(deprecate, message, site) + return set.apply(this, arguments) + } + } + + Object.defineProperty(obj, prop, descriptor) +} + +/** + * Create DeprecationError for deprecation + */ + +function DeprecationError(namespace, message, stack) { + var error = new Error() + var stackString + + Object.defineProperty(error, 'constructor', { + value: DeprecationError + }) + + Object.defineProperty(error, 'message', { + configurable: true, + enumerable: false, + value: message, + writable: true + }) + + Object.defineProperty(error, 'name', { + enumerable: false, + configurable: true, + value: 'DeprecationError', + writable: true + }) + + Object.defineProperty(error, 'namespace', { + configurable: true, + enumerable: false, + value: namespace, + writable: true + }) + + Object.defineProperty(error, 'stack', { + configurable: true, + enumerable: false, + get: function () { + if (stackString !== undefined) { + return stackString + } + + // prepare stack trace + return stackString = createStackString.call(this, stack) + }, + set: function setter(val) { + stackString = val + } + }) + + return error +} diff --git a/Server File/node_modules/depd/lib/browser/index.js b/Server File/node_modules/depd/lib/browser/index.js new file mode 100644 index 0000000..f464e05 --- /dev/null +++ b/Server File/node_modules/depd/lib/browser/index.js @@ -0,0 +1,79 @@ +/*! + * depd + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = depd + +/** + * Create deprecate for namespace in caller. + */ + +function depd(namespace) { + if (!namespace) { + throw new TypeError('argument namespace is required') + } + + function deprecate(message) { + // no-op in browser + } + + deprecate._file = undefined + deprecate._ignored = true + deprecate._namespace = namespace + deprecate._traced = false + deprecate._warned = Object.create(null) + + deprecate.function = wrapfunction + deprecate.property = wrapproperty + + return deprecate +} + +/** + * Return a wrapped function in a deprecation message. + * + * This is a no-op version of the wrapper, which does nothing but call + * validation. + */ + +function wrapfunction(fn, message) { + if (typeof fn !== 'function') { + throw new TypeError('argument fn must be a function') + } + + return fn +} + +/** + * Wrap property in a deprecation message. + * + * This is a no-op version of the wrapper, which does nothing but call + * validation. + */ + +function wrapproperty(obj, prop, message) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new TypeError('argument obj must be object') + } + + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + + if (!descriptor) { + throw new TypeError('must call property on owner object') + } + + if (!descriptor.configurable) { + throw new TypeError('property must be configurable') + } + + return +} diff --git a/Server File/node_modules/depd/lib/compat/buffer-concat.js b/Server File/node_modules/depd/lib/compat/buffer-concat.js new file mode 100644 index 0000000..4b73381 --- /dev/null +++ b/Server File/node_modules/depd/lib/compat/buffer-concat.js @@ -0,0 +1,35 @@ +/*! + * depd + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + */ + +module.exports = bufferConcat + +/** + * Concatenate an array of Buffers. + */ + +function bufferConcat(bufs) { + var length = 0 + + for (var i = 0, len = bufs.length; i < len; i++) { + length += bufs[i].length + } + + var buf = new Buffer(length) + var pos = 0 + + for (var i = 0, len = bufs.length; i < len; i++) { + bufs[i].copy(buf, pos) + pos += bufs[i].length + } + + return buf +} diff --git a/Server File/node_modules/depd/lib/compat/callsite-tostring.js b/Server File/node_modules/depd/lib/compat/callsite-tostring.js new file mode 100644 index 0000000..9ecef34 --- /dev/null +++ b/Server File/node_modules/depd/lib/compat/callsite-tostring.js @@ -0,0 +1,103 @@ +/*! + * depd + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + */ + +module.exports = callSiteToString + +/** + * Format a CallSite file location to a string. + */ + +function callSiteFileLocation(callSite) { + var fileName + var fileLocation = '' + + if (callSite.isNative()) { + fileLocation = 'native' + } else if (callSite.isEval()) { + fileName = callSite.getScriptNameOrSourceURL() + if (!fileName) { + fileLocation = callSite.getEvalOrigin() + } + } else { + fileName = callSite.getFileName() + } + + if (fileName) { + fileLocation += fileName + + var lineNumber = callSite.getLineNumber() + if (lineNumber != null) { + fileLocation += ':' + lineNumber + + var columnNumber = callSite.getColumnNumber() + if (columnNumber) { + fileLocation += ':' + columnNumber + } + } + } + + return fileLocation || 'unknown source' +} + +/** + * Format a CallSite to a string. + */ + +function callSiteToString(callSite) { + var addSuffix = true + var fileLocation = callSiteFileLocation(callSite) + var functionName = callSite.getFunctionName() + var isConstructor = callSite.isConstructor() + var isMethodCall = !(callSite.isToplevel() || isConstructor) + var line = '' + + if (isMethodCall) { + var methodName = callSite.getMethodName() + var typeName = getConstructorName(callSite) + + if (functionName) { + if (typeName && functionName.indexOf(typeName) !== 0) { + line += typeName + '.' + } + + line += functionName + + if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) { + line += ' [as ' + methodName + ']' + } + } else { + line += typeName + '.' + (methodName || '') + } + } else if (isConstructor) { + line += 'new ' + (functionName || '') + } else if (functionName) { + line += functionName + } else { + addSuffix = false + line += fileLocation + } + + if (addSuffix) { + line += ' (' + fileLocation + ')' + } + + return line +} + +/** + * Get constructor name of reviver. + */ + +function getConstructorName(obj) { + var receiver = obj.receiver + return (receiver.constructor && receiver.constructor.name) || null +} diff --git a/Server File/node_modules/depd/lib/compat/event-listener-count.js b/Server File/node_modules/depd/lib/compat/event-listener-count.js new file mode 100644 index 0000000..a05fceb --- /dev/null +++ b/Server File/node_modules/depd/lib/compat/event-listener-count.js @@ -0,0 +1,22 @@ +/*! + * depd + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = eventListenerCount + +/** + * Get the count of listeners on an event emitter of a specific type. + */ + +function eventListenerCount(emitter, type) { + return emitter.listeners(type).length +} diff --git a/Server File/node_modules/depd/lib/compat/index.js b/Server File/node_modules/depd/lib/compat/index.js new file mode 100644 index 0000000..aa3c1de --- /dev/null +++ b/Server File/node_modules/depd/lib/compat/index.js @@ -0,0 +1,84 @@ +/*! + * depd + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var Buffer = require('buffer') +var EventEmitter = require('events').EventEmitter + +/** + * Module exports. + * @public + */ + +lazyProperty(module.exports, 'bufferConcat', function bufferConcat() { + return Buffer.concat || require('./buffer-concat') +}) + +lazyProperty(module.exports, 'callSiteToString', function callSiteToString() { + var limit = Error.stackTraceLimit + var obj = {} + var prep = Error.prepareStackTrace + + function prepareObjectStackTrace(obj, stack) { + return stack + } + + Error.prepareStackTrace = prepareObjectStackTrace + Error.stackTraceLimit = 2 + + // capture the stack + Error.captureStackTrace(obj) + + // slice the stack + var stack = obj.stack.slice() + + Error.prepareStackTrace = prep + Error.stackTraceLimit = limit + + return stack[0].toString ? toString : require('./callsite-tostring') +}) + +lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount() { + return EventEmitter.listenerCount || require('./event-listener-count') +}) + +/** + * Define a lazy property. + */ + +function lazyProperty(obj, prop, getter) { + function get() { + var val = getter() + + Object.defineProperty(obj, prop, { + configurable: true, + enumerable: true, + value: val + }) + + return val + } + + Object.defineProperty(obj, prop, { + configurable: true, + enumerable: true, + get: get + }) +} + +/** + * Call toString() on the obj + */ + +function toString(obj) { + return obj.toString() +} diff --git a/Server File/node_modules/depd/package.json b/Server File/node_modules/depd/package.json new file mode 100644 index 0000000..cb3d0db --- /dev/null +++ b/Server File/node_modules/depd/package.json @@ -0,0 +1,103 @@ +{ + "_args": [ + [ + { + "raw": "depd@~1.1.0", + "scope": null, + "escapedName": "depd", + "name": "depd", + "rawSpec": "~1.1.0", + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express" + ] + ], + "_from": "depd@>=1.1.0 <1.2.0", + "_id": "depd@1.1.0", + "_inCache": true, + "_location": "/depd", + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "depd@~1.1.0", + "scope": null, + "escapedName": "depd", + "name": "depd", + "rawSpec": "~1.1.0", + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/express", + "/http-errors", + "/send" + ], + "_resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", + "_shasum": "e1bd82c6aab6ced965b97b88b17ed3e528ca18c3", + "_shrinkwrap": null, + "_spec": "depd@~1.1.0", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express", + "author": { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + "browser": "lib/browser/index.js", + "bugs": { + "url": "https://github.com/dougwilson/nodejs-depd/issues" + }, + "dependencies": {}, + "description": "Deprecate all the things", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "1.0.0", + "istanbul": "0.3.5", + "mocha": "~1.21.5" + }, + "directories": {}, + "dist": { + "shasum": "e1bd82c6aab6ced965b97b88b17ed3e528ca18c3", + "tarball": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "lib/", + "History.md", + "LICENSE", + "index.js", + "Readme.md" + ], + "gitHead": "78c659de20283e3a6bee92bda455e6daff01686a", + "homepage": "https://github.com/dougwilson/nodejs-depd", + "keywords": [ + "deprecate", + "deprecated" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "depd", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/dougwilson/nodejs-depd.git" + }, + "scripts": { + "bench": "node benchmark/index.js", + "test": "mocha --reporter spec --bail test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --no-exit test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/" + }, + "version": "1.1.0" +} diff --git a/Server File/node_modules/destroy/LICENSE b/Server File/node_modules/destroy/LICENSE new file mode 100644 index 0000000..a7ae8ee --- /dev/null +++ b/Server File/node_modules/destroy/LICENSE @@ -0,0 +1,22 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Server File/node_modules/destroy/README.md b/Server File/node_modules/destroy/README.md new file mode 100644 index 0000000..6474bc3 --- /dev/null +++ b/Server File/node_modules/destroy/README.md @@ -0,0 +1,60 @@ +# Destroy + +[![NPM version][npm-image]][npm-url] +[![Build status][travis-image]][travis-url] +[![Test coverage][coveralls-image]][coveralls-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] +[![Gittip][gittip-image]][gittip-url] + +Destroy a stream. + +This module is meant to ensure a stream gets destroyed, handling different APIs +and Node.js bugs. + +## API + +```js +var destroy = require('destroy') +``` + +### destroy(stream) + +Destroy the given stream. In most cases, this is identical to a simple +`stream.destroy()` call. The rules are as follows for a given stream: + + 1. If the `stream` is an instance of `ReadStream`, then call `stream.destroy()` + and add a listener to the `open` event to call `stream.close()` if it is + fired. This is for a Node.js bug that will leak a file descriptor if + `.destroy()` is called before `open`. + 2. If the `stream` is not an instance of `Stream`, then nothing happens. + 3. If the `stream` has a `.destroy()` method, then call it. + +The function returns the `stream` passed in as the argument. + +## Example + +```js +var destroy = require('destroy') + +var fs = require('fs') +var stream = fs.createReadStream('package.json') + +// ... and later +destroy(stream) +``` + +[npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square +[npm-url]: https://npmjs.org/package/destroy +[github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square +[github-url]: https://github.com/stream-utils/destroy/tags +[travis-image]: https://img.shields.io/travis/stream-utils/destroy.svg?style=flat-square +[travis-url]: https://travis-ci.org/stream-utils/destroy +[coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square +[coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master +[license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square +[license-url]: LICENSE.md +[downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square +[downloads-url]: https://npmjs.org/package/destroy +[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square +[gittip-url]: https://www.gittip.com/jonathanong/ diff --git a/Server File/node_modules/destroy/index.js b/Server File/node_modules/destroy/index.js new file mode 100644 index 0000000..6da2d26 --- /dev/null +++ b/Server File/node_modules/destroy/index.js @@ -0,0 +1,75 @@ +/*! + * destroy + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var ReadStream = require('fs').ReadStream +var Stream = require('stream') + +/** + * Module exports. + * @public + */ + +module.exports = destroy + +/** + * Destroy a stream. + * + * @param {object} stream + * @public + */ + +function destroy(stream) { + if (stream instanceof ReadStream) { + return destroyReadStream(stream) + } + + if (!(stream instanceof Stream)) { + return stream + } + + if (typeof stream.destroy === 'function') { + stream.destroy() + } + + return stream +} + +/** + * Destroy a ReadStream. + * + * @param {object} stream + * @private + */ + +function destroyReadStream(stream) { + stream.destroy() + + if (typeof stream.close === 'function') { + // node.js core bug work-around + stream.on('open', onOpenClose) + } + + return stream +} + +/** + * On open handler to close stream. + * @private + */ + +function onOpenClose() { + if (typeof this.fd === 'number') { + // actually close down the fd + this.close() + } +} diff --git a/Server File/node_modules/destroy/package.json b/Server File/node_modules/destroy/package.json new file mode 100644 index 0000000..2443326 --- /dev/null +++ b/Server File/node_modules/destroy/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + { + "raw": "destroy@~1.0.4", + "scope": null, + "escapedName": "destroy", + "name": "destroy", + "rawSpec": "~1.0.4", + "spec": ">=1.0.4 <1.1.0", + "type": "range" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\send" + ] + ], + "_from": "destroy@>=1.0.4 <1.1.0", + "_id": "destroy@1.0.4", + "_inCache": true, + "_location": "/destroy", + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "destroy@~1.0.4", + "scope": null, + "escapedName": "destroy", + "name": "destroy", + "rawSpec": "~1.0.4", + "spec": ">=1.0.4 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/send" + ], + "_resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "_shasum": "978857442c44749e4206613e37946205826abd80", + "_shrinkwrap": null, + "_spec": "destroy@~1.0.4", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\send", + "author": { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + }, + "bugs": { + "url": "https://github.com/stream-utils/destroy/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + } + ], + "dependencies": {}, + "description": "destroy a stream if possible", + "devDependencies": { + "istanbul": "0.4.2", + "mocha": "2.3.4" + }, + "directories": {}, + "dist": { + "shasum": "978857442c44749e4206613e37946205826abd80", + "tarball": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz" + }, + "files": [ + "index.js", + "LICENSE" + ], + "gitHead": "86edea01456f5fa1027f6a47250c34c713cbcc3b", + "homepage": "https://github.com/stream-utils/destroy", + "keywords": [ + "stream", + "streams", + "destroy", + "cleanup", + "leak", + "fd" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jongleberry", + "email": "jonathanrichardong@gmail.com" + }, + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "destroy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/stream-utils/destroy.git" + }, + "scripts": { + "test": "mocha --reporter spec", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot" + }, + "version": "1.0.4" +} diff --git a/Server File/node_modules/ee-first/LICENSE b/Server File/node_modules/ee-first/LICENSE new file mode 100644 index 0000000..a7ae8ee --- /dev/null +++ b/Server File/node_modules/ee-first/LICENSE @@ -0,0 +1,22 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Server File/node_modules/ee-first/README.md b/Server File/node_modules/ee-first/README.md new file mode 100644 index 0000000..cbd2478 --- /dev/null +++ b/Server File/node_modules/ee-first/README.md @@ -0,0 +1,80 @@ +# EE First + +[![NPM version][npm-image]][npm-url] +[![Build status][travis-image]][travis-url] +[![Test coverage][coveralls-image]][coveralls-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] +[![Gittip][gittip-image]][gittip-url] + +Get the first event in a set of event emitters and event pairs, +then clean up after itself. + +## Install + +```sh +$ npm install ee-first +``` + +## API + +```js +var first = require('ee-first') +``` + +### first(arr, listener) + +Invoke `listener` on the first event from the list specified in `arr`. `arr` is +an array of arrays, with each array in the format `[ee, ...event]`. `listener` +will be called only once, the first time any of the given events are emitted. If +`error` is one of the listened events, then if that fires first, the `listener` +will be given the `err` argument. + +The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the +first argument emitted from an `error` event, if applicable; `ee` is the event +emitter that fired; `event` is the string event name that fired; and `args` is an +array of the arguments that were emitted on the event. + +```js +var ee1 = new EventEmitter() +var ee2 = new EventEmitter() + +first([ + [ee1, 'close', 'end', 'error'], + [ee2, 'error'] +], function (err, ee, event, args) { + // listener invoked +}) +``` + +#### .cancel() + +The group of listeners can be cancelled before being invoked and have all the event +listeners removed from the underlying event emitters. + +```js +var thunk = first([ + [ee1, 'close', 'end', 'error'], + [ee2, 'error'] +], function (err, ee, event, args) { + // listener invoked +}) + +// cancel and clean up +thunk.cancel() +``` + +[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square +[npm-url]: https://npmjs.org/package/ee-first +[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square +[github-url]: https://github.com/jonathanong/ee-first/tags +[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square +[travis-url]: https://travis-ci.org/jonathanong/ee-first +[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square +[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master +[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square +[license-url]: LICENSE.md +[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square +[downloads-url]: https://npmjs.org/package/ee-first +[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square +[gittip-url]: https://www.gittip.com/jonathanong/ diff --git a/Server File/node_modules/ee-first/index.js b/Server File/node_modules/ee-first/index.js new file mode 100644 index 0000000..501287c --- /dev/null +++ b/Server File/node_modules/ee-first/index.js @@ -0,0 +1,95 @@ +/*! + * ee-first + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = first + +/** + * Get the first event in a set of event emitters and event pairs. + * + * @param {array} stuff + * @param {function} done + * @public + */ + +function first(stuff, done) { + if (!Array.isArray(stuff)) + throw new TypeError('arg must be an array of [ee, events...] arrays') + + var cleanups = [] + + for (var i = 0; i < stuff.length; i++) { + var arr = stuff[i] + + if (!Array.isArray(arr) || arr.length < 2) + throw new TypeError('each array member must be [ee, events...]') + + var ee = arr[0] + + for (var j = 1; j < arr.length; j++) { + var event = arr[j] + var fn = listener(event, callback) + + // listen to the event + ee.on(event, fn) + // push this listener to the list of cleanups + cleanups.push({ + ee: ee, + event: event, + fn: fn, + }) + } + } + + function callback() { + cleanup() + done.apply(null, arguments) + } + + function cleanup() { + var x + for (var i = 0; i < cleanups.length; i++) { + x = cleanups[i] + x.ee.removeListener(x.event, x.fn) + } + } + + function thunk(fn) { + done = fn + } + + thunk.cancel = cleanup + + return thunk +} + +/** + * Create the event listener. + * @private + */ + +function listener(event, done) { + return function onevent(arg1) { + var args = new Array(arguments.length) + var ee = this + var err = event === 'error' + ? arg1 + : null + + // copy args to prevent arguments escaping scope + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + + done(err, ee, event, args) + } +} diff --git a/Server File/node_modules/ee-first/package.json b/Server File/node_modules/ee-first/package.json new file mode 100644 index 0000000..21b3c82 --- /dev/null +++ b/Server File/node_modules/ee-first/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + { + "raw": "ee-first@1.1.1", + "scope": null, + "escapedName": "ee-first", + "name": "ee-first", + "rawSpec": "1.1.1", + "spec": "1.1.1", + "type": "version" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\on-finished" + ] + ], + "_from": "ee-first@1.1.1", + "_id": "ee-first@1.1.1", + "_inCache": true, + "_location": "/ee-first", + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "ee-first@1.1.1", + "scope": null, + "escapedName": "ee-first", + "name": "ee-first", + "rawSpec": "1.1.1", + "spec": "1.1.1", + "type": "version" + }, + "_requiredBy": [ + "/on-finished" + ], + "_resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "_shasum": "590c61156b0ae2f4f0255732a158b266bc56b21d", + "_shrinkwrap": null, + "_spec": "ee-first@1.1.1", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\on-finished", + "author": { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + }, + "bugs": { + "url": "https://github.com/jonathanong/ee-first/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + } + ], + "dependencies": {}, + "description": "return the first event in a set of ee/event pairs", + "devDependencies": { + "istanbul": "0.3.9", + "mocha": "2.2.5" + }, + "directories": {}, + "dist": { + "shasum": "590c61156b0ae2f4f0255732a158b266bc56b21d", + "tarball": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" + }, + "files": [ + "index.js", + "LICENSE" + ], + "gitHead": "512e0ce4cc3643f603708f965a97b61b1a9c0441", + "homepage": "https://github.com/jonathanong/ee-first", + "license": "MIT", + "maintainers": [ + { + "name": "jongleberry", + "email": "jonathanrichardong@gmail.com" + }, + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "ee-first", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonathanong/ee-first.git" + }, + "scripts": { + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "1.1.1" +} diff --git a/Server File/node_modules/encodeurl/HISTORY.md b/Server File/node_modules/encodeurl/HISTORY.md new file mode 100644 index 0000000..06d34a5 --- /dev/null +++ b/Server File/node_modules/encodeurl/HISTORY.md @@ -0,0 +1,9 @@ +1.0.1 / 2016-06-09 +================== + + * Fix encoding unpaired surrogates at start/end of string + +1.0.0 / 2016-06-08 +================== + + * Initial release diff --git a/Server File/node_modules/encodeurl/LICENSE b/Server File/node_modules/encodeurl/LICENSE new file mode 100644 index 0000000..8812229 --- /dev/null +++ b/Server File/node_modules/encodeurl/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2016 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Server File/node_modules/encodeurl/README.md b/Server File/node_modules/encodeurl/README.md new file mode 100644 index 0000000..b086133 --- /dev/null +++ b/Server File/node_modules/encodeurl/README.md @@ -0,0 +1,124 @@ +# encodeurl + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Encode a URL to a percent-encoded form, excluding already-encoded sequences + +## Installation + +```sh +$ npm install encodeurl +``` + +## API + +```js +var encodeUrl = require('encodeurl') +``` + +### encodeUrl(url) + +Encode a URL to a percent-encoded form, excluding already-encoded sequences. + +This function will take an already-encoded URL and encode all the non-URL +code points (as UTF-8 byte sequences). This function will not encode the +"%" character unless it is not part of a valid sequence (`%20` will be +left as-is, but `%foo` will be encoded as `%25foo`). + +This encode is meant to be "safe" and does not throw errors. It will try as +hard as it can to properly encode the given URL, including replacing any raw, +unpaired surrogate pairs with the Unicode replacement character prior to +encoding. + +This function is _similar_ to the intrinsic function `encodeURI`, except it +will not encode the `%` character if that is part of a valid sequence, will +not encode `[` and `]` (for IPv6 hostnames) and will replace raw, unpaired +surrogate pairs with the Unicode replacement character (instead of throwing). + +## Examples + +### Encode a URL containing user-controled data + +```js +var encodeUrl = require('encodeurl') +var escapeHtml = require('escape-html') + +http.createServer(function onRequest (req, res) { + // get encoded form of inbound url + var url = encodeUrl(req.url) + + // create html message + var body = '

Location ' + escapeHtml(url) + ' not found

' + + // send a 404 + res.statusCode = 404 + res.setHeader('Content-Type', 'text/html; charset=UTF-8') + res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8'))) + res.end(body, 'utf-8') +}) +``` + +### Encode a URL for use in a header field + +```js +var encodeUrl = require('encodeurl') +var escapeHtml = require('escape-html') +var url = require('url') + +http.createServer(function onRequest (req, res) { + // parse inbound url + var href = url.parse(req) + + // set new host for redirect + href.host = 'localhost' + href.protocol = 'https:' + href.slashes = true + + // create location header + var location = encodeUrl(url.format(href)) + + // create html message + var body = '

Redirecting to new site: ' + escapeHtml(location) + '

' + + // send a 301 + res.statusCode = 301 + res.setHeader('Content-Type', 'text/html; charset=UTF-8') + res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8'))) + res.setHeader('Location', location) + res.end(body, 'utf-8') +}) +``` + +## Testing + +```sh +$ npm test +$ npm run lint +``` + +## References + +- [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax][rfc-3986] +- [WHATWG URL Living Standard][whatwg-url] + +[rfc-3986]: https://tools.ietf.org/html/rfc3986 +[whatwg-url]: https://url.spec.whatwg.org/ + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/encodeurl.svg +[npm-url]: https://npmjs.org/package/encodeurl +[node-version-image]: https://img.shields.io/node/v/encodeurl.svg +[node-version-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/pillarjs/encodeurl.svg +[travis-url]: https://travis-ci.org/pillarjs/encodeurl +[coveralls-image]: https://img.shields.io/coveralls/pillarjs/encodeurl.svg +[coveralls-url]: https://coveralls.io/r/pillarjs/encodeurl?branch=master +[downloads-image]: https://img.shields.io/npm/dm/encodeurl.svg +[downloads-url]: https://npmjs.org/package/encodeurl diff --git a/Server File/node_modules/encodeurl/index.js b/Server File/node_modules/encodeurl/index.js new file mode 100644 index 0000000..ae77cc9 --- /dev/null +++ b/Server File/node_modules/encodeurl/index.js @@ -0,0 +1,60 @@ +/*! + * encodeurl + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = encodeUrl + +/** + * RegExp to match non-URL code points, *after* encoding (i.e. not including "%") + * and including invalid escape sequences. + * @private + */ + +var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]))+/g + +/** + * RegExp to match unmatched surrogate pair. + * @private + */ + +var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g + +/** + * String to replace unmatched surrogate pair with. + * @private + */ + +var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2' + +/** + * Encode a URL to a percent-encoded form, excluding already-encoded sequences. + * + * This function will take an already-encoded URL and encode all the non-URL + * code points. This function will not encode the "%" character unless it is + * not part of a valid sequence (`%20` will be left as-is, but `%foo` will + * be encoded as `%25foo`). + * + * This encode is meant to be "safe" and does not throw errors. It will try as + * hard as it can to properly encode the given URL, including replacing any raw, + * unpaired surrogate pairs with the Unicode replacement character prior to + * encoding. + * + * @param {string} url + * @return {string} + * @public + */ + +function encodeUrl (url) { + return String(url) + .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE) + .replace(ENCODE_CHARS_REGEXP, encodeURI) +} diff --git a/Server File/node_modules/encodeurl/package.json b/Server File/node_modules/encodeurl/package.json new file mode 100644 index 0000000..e0e0ab8 --- /dev/null +++ b/Server File/node_modules/encodeurl/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + { + "raw": "encodeurl@~1.0.1", + "scope": null, + "escapedName": "encodeurl", + "name": "encodeurl", + "rawSpec": "~1.0.1", + "spec": ">=1.0.1 <1.1.0", + "type": "range" + }, + "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express" + ] + ], + "_from": "encodeurl@>=1.0.1 <1.1.0", + "_id": "encodeurl@1.0.1", + "_inCache": true, + "_location": "/encodeurl", + "_nodeVersion": "4.4.3", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/encodeurl-1.0.1.tgz_1465519736251_0.09314409433864057" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "raw": "encodeurl@~1.0.1", + "scope": null, + "escapedName": "encodeurl", + "name": "encodeurl", + "rawSpec": "~1.0.1", + "spec": ">=1.0.1 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/express", + "/finalhandler", + "/send", + "/serve-static" + ], + "_resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", + "_shasum": "79e3d58655346909fe6f0f45a5de68103b294d20", + "_shrinkwrap": null, + "_spec": "encodeurl@~1.0.1", + "_where": "C:\\Users\\Tejas\\Desktop\\Video1\\node_modules\\express", + "bugs": { + "url": "https://github.com/pillarjs/encodeurl/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + } + ], + "dependencies": {}, + "description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences", + "devDependencies": { + "eslint": "2.11.1", + "eslint-config-standard": "5.3.1", + "eslint-plugin-promise": "1.3.2", + "eslint-plugin-standard": "1.3.2", + "istanbul": "0.4.3", + "mocha": "2.5.3" + }, + "directories": {}, + "dist": { + "shasum": "79e3d58655346909fe6f0f45a5de68103b294d20", + "tarball": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "gitHead": "39ed0c235fed4cea7d012038fd6bb0480561d226", + "homepage": "https://github.com/pillarjs/encodeurl#readme", + "keywords": [ + "encode", + "encodeurl", + "url" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "encodeurl", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/pillarjs/encodeurl.git" + }, + "scripts": { + "lint": "eslint **/*.js", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "1.0.1" +} diff --git a/Server File/node_modules/engine.io-client/History.md b/Server File/node_modules/engine.io-client/History.md new file mode 100644 index 0000000..3259896 --- /dev/null +++ b/Server File/node_modules/engine.io-client/History.md @@ -0,0 +1,683 @@ + +3.1.1 / 2017-05-19 +=================== + + * [test] Launch browser tests on localhost by default (#571) + * [chore] Unpin debug version (#568) + +3.1.0 / 2017-04-28 +=================== + + * [chore] Bump engine.io-parser to version 2.1.1 (#566) + * [chore] Pin debug to version 2.6.4 (#567) + * [chore] Bump engine.io-parser to version 2.1.0 (#565) + * [chore] Bump ws to version 2.3.1 (#564) + * [chore] Bump debug to version 2.6.4 (#563) + * [refactor] Set responseType based on 'Content-Type' header (#562) + +3.0.0 / 2017-04-06 +=================== + + * [chore] Bump dependencies (#560) + * [fix] Default `rejectUnauthorized` to `true` (#558) + * [chore] Drop support for old nodejs versions (0.10 & 0.12) (#557) + +2.1.1 / 2017-03-22 +=================== + + * [chore] Bump engine.io-parser to version 2.0.2 (#555) + +2.1.0 / 2017-03-11 +=================== + + * [chore] Bump engine.io-parser to version 2.0.1 (#549) + * [chore] Bump concat-stream to version 1.5.2 (#548) + * [feat] Allow to set the protocols for the websocket transport (#546) + +2.0.2 / 2017-02-16 +=================== + + * [chore] Bump ws to version 1.1.2 (vulnerability fix) (#539) + * [fix] Fix extraHeaders option in browser (#536) + +2.0.1 / 2017-01-30 +=================== + +(bump following engine.io version) + +2.0.0 / 2017-01-22 +=================== + + * [chore] Fix Saucelabs tests (#532) + * [chore] Actually run tests in Saucelabs (#527) + * [feature] Allow extraHeaders to be set for browser clients in XHR requests (#519) + * [feature] Add support for per transport options (#518) + * [chore] Bump engine.io-parser to version 2.0.0 (#525) + * [chore] Update zuul config to speed up tests (#526) + +1.8.2 / 2016-12-11 +=================== + + * [chore] Bump engine.io-parser to version 1.3.2 (#523) + +1.8.1 / 2016-11-27 +=================== + + * [fix] Only add defined callbacks to the stack (#447) + +1.8.0 / 2016-11-20 +=================== + + * [fix] Fixed regression creating connection over https from node (#513) + * [fix] Fixed regression creating connection over wss from node (#514) + * [feature] Enable definition of timeouts for xhr-polling (#456) + * [feature] Added flag forceNode to override the normal behavior of prefering Browser based implementations. (#469) + * [feature] add localAddress option (#487) + * [chore] update dependencies (#516) + * [chore] Speed up lint by avoiding '**/*.js' matching pattern (#517) + * [chore] Bump debug to version 2.3.3 (#520) + +1.7.2 / 2016-10-24 +=================== + + * [fix] Set accept header to */* to support react app proxy (#508) + * [fix] remove a workaround for ios (#465) + * [fix] onPacket now emits data on 'closing' state as well (#484) + * [fix] Obfuscate `ActiveXObject` occurrences (#509) + * [docs] Add missing `onlyBinaryUpgrades` option in the docs (#510) + * [chore] Add Github issue and PR templates (#511) + +1.7.1 / 2016-10-20 +=================== + + * [fix] Define "requestsCount" var and "requests" hash unconditionally (#490) + * [perf] Add all properties to the socket in the constructor (#488) + * [chore] Update zuul browser settings (#504) + * [chore] Bump engine.io-parser to 1.3.1 (#505) + * [chore] Use more-specific imports for StealJS compatibility (#467) + +1.7.0 / 2016-10-05 +=================== + + * [fix] Revert "default `rejectUnauthorized` to `true`" (#496) + * [fix] Use xhr.responseText if xhr.response is not provided (#483) + * [fix] Fix issue with errors during WebSocket creation not being caught (#475) + * [style] Add missing semi-colon (#501) + * [chore] Add gulp & babel in the build process (#455) + * [chore] Add eslint (#458) + * [chore] Bump zuul (#464) + * [chore] Remove unused submodule (#466) + * [chore] Bumping ws to 1.1.1 (#478) + * [chore] Update zuul browser settings following EOL notices (#486) + * [chore] Bump engine.io-parser (#492) + * [chore] Make the build status badge point towards master (#497) + * [chore] Bump zuul to 3.11.0 & zuul-ngrok to 4.0.0 (#498) + * [chore] Restrict files included in npm package (#499) + +1.6.11 / 2016-06-23 +=================== + + * bump version + +1.6.10 / 2016-06-23 +=================== + + * bump version + +1.6.9 / 2016-05-02 +================== + + * default `rejectUnauthorized` to `true` + +1.6.8 / 2016-01-25 +================== + + * safely resolve `ws` module + +1.6.7 / 2016-01-10 +================== + + * prevent `ws` from being added to the bundle + * added jsonp fix for when no ` + +``` + +### With browserify + +Engine.IO is a commonjs module, which means you can include it by using +`require` on the browser and package using [browserify](http://browserify.org/): + +1. install the client package + + ```bash + $ npm install engine.io-client + ``` + +1. write your app code + + ```js + var socket = require('engine.io-client')('ws://localhost'); + socket.on('open', function(){ + socket.on('message', function(data){}); + socket.on('close', function(){}); + }); + ``` + +1. build your app bundle + + ```bash + $ browserify app.js > bundle.js + ``` + +1. include on your page + + ```html + + ``` + +### Sending and receiving binary + +```html + + +``` + +### Node.JS + +Add `engine.io-client` to your `package.json` and then: + +```js +var socket = require('engine.io-client')('ws://localhost'); +socket.on('open', function(){ + socket.on('message', function(data){}); + socket.on('close', function(){}); +}); +``` + +### Node.js with certificates +```js +var opts = { + key: fs.readFileSync('test/fixtures/client.key'), + cert: fs.readFileSync('test/fixtures/client.crt'), + ca: fs.readFileSync('test/fixtures/ca.crt') +}; + +var socket = require('engine.io-client')('ws://localhost', opts); +socket.on('open', function(){ + socket.on('message', function(data){}); + socket.on('close', function(){}); +}); +``` + +### Node.js with extraHeaders +```js +var opts = { + extraHeaders: { + 'X-Custom-Header-For-My-Project': 'my-secret-access-token', + 'Cookie': 'user_session=NI2JlCKF90aE0sJZD9ZzujtdsUqNYSBYxzlTsvdSUe35ZzdtVRGqYFr0kdGxbfc5gUOkR9RGp20GVKza; path=/; expires=Tue, 07-Apr-2015 18:18:08 GMT; secure; HttpOnly' + } +}; + +var socket = require('engine.io-client')('ws://localhost', opts); +socket.on('open', function(){ + socket.on('message', function(data){}); + socket.on('close', function(){}); +}); +``` + +## Features + +- Lightweight +- Runs on browser and node.js seamlessly +- Transports are independent of `Engine` + - Easy to debug + - Easy to unit test +- Runs inside HTML5 WebWorker +- Can send and receive binary data + - Receives as ArrayBuffer or Blob when in browser, and Buffer or ArrayBuffer + in Node + - When XHR2 or WebSockets are used, binary is emitted directly. Otherwise + binary is encoded into base64 strings, and decoded when binary types are + supported. + - With browsers that don't support ArrayBuffer, an object { base64: true, + data: dataAsBase64String } is emitted on the `message` event. + +## API + +### Socket + +The client class. Mixes in [Emitter](http://github.com/component/emitter). +Exposed as `eio` in the browser standalone build. + +#### Properties + +- `protocol` _(Number)_: protocol revision number +- `binaryType` _(String)_ : can be set to 'arraybuffer' or 'blob' in browsers, + and `buffer` or `arraybuffer` in Node. Blob is only used in browser if it's + supported. + +#### Events + +- `open` + - Fired upon successful connection. +- `message` + - Fired when data is received from the server. + - **Arguments** + - `String` | `ArrayBuffer`: utf-8 encoded data or ArrayBuffer containing + binary data +- `close` + - Fired upon disconnection. In compliance with the WebSocket API spec, this event may be + fired even if the `open` event does not occur (i.e. due to connection error or `close()`). +- `error` + - Fired when an error occurs. +- `flush` + - Fired upon completing a buffer flush +- `drain` + - Fired after `drain` event of transport if writeBuffer is empty +- `upgradeError` + - Fired if an error occurs with a transport we're trying to upgrade to. +- `upgrade` + - Fired upon upgrade success, after the new transport is set +- `ping` + - Fired upon _flushing_ a ping packet (ie: actual packet write out) +- `pong` + - Fired upon receiving a pong packet. + +#### Methods + +- **constructor** + - Initializes the client + - **Parameters** + - `String` uri + - `Object`: optional, options object + - **Options** + - `agent` (`http.Agent`): `http.Agent` to use, defaults to `false` (NodeJS only) + - `upgrade` (`Boolean`): defaults to true, whether the client should try + to upgrade the transport from long-polling to something better. + - `forceJSONP` (`Boolean`): forces JSONP for polling transport. + - `jsonp` (`Boolean`): determines whether to use JSONP when + necessary for polling. If disabled (by settings to false) an error will + be emitted (saying "No transports available") if no other transports + are available. If another transport is available for opening a + connection (e.g. WebSocket) that transport + will be used instead. + - `forceBase64` (`Boolean`): forces base 64 encoding for polling transport even when XHR2 responseType is available and WebSocket even if the used standard supports binary. + - `enablesXDR` (`Boolean`): enables XDomainRequest for IE8 to avoid loading bar flashing with click sound. default to `false` because XDomainRequest has a flaw of not sending cookie. + - `timestampRequests` (`Boolean`): whether to add the timestamp with each + transport request. Note: polling requests are always stamped unless this + option is explicitly set to `false` (`false`) + - `timestampParam` (`String`): timestamp parameter (`t`) + - `policyPort` (`Number`): port the policy server listens on (`843`) + - `path` (`String`): path to connect to, default is `/engine.io` + - `transports` (`Array`): a list of transports to try (in order). + Defaults to `['polling', 'websocket']`. `Engine` + always attempts to connect directly with the first one, provided the + feature detection test for it passes. + - `transportOptions` (`Object`): hash of options, indexed by transport name, overriding the common options for the given transport + - `rememberUpgrade` (`Boolean`): defaults to false. + If true and if the previous websocket connection to the server succeeded, + the connection attempt will bypass the normal upgrade process and will initially + try websocket. A connection attempt following a transport error will use the + normal upgrade process. It is recommended you turn this on only when using + SSL/TLS connections, or if you know that your network does not block websockets. + - `pfx` (`String`): Certificate, Private key and CA certificates to use for SSL. Can be used in Node.js client environment to manually specify certificate information. + - `key` (`String`): Private key to use for SSL. Can be used in Node.js client environment to manually specify certificate information. + - `passphrase` (`String`): A string of passphrase for the private key or pfx. Can be used in Node.js client environment to manually specify certificate information. + - `cert` (`String`): Public x509 certificate to use. Can be used in Node.js client environment to manually specify certificate information. + - `ca` (`String`|`Array`): An authority certificate or array of authority certificates to check the remote host against.. Can be used in Node.js client environment to manually specify certificate information. + - `ciphers` (`String`): A string describing the ciphers to use or exclude. Consult the [cipher format list](http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT) for details on the format. Can be used in Node.js client environment to manually specify certificate information. + - `rejectUnauthorized` (`Boolean`): If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Verification happens at the connection level, before the HTTP request is sent. Can be used in Node.js client environment to manually specify certificate information. + - `perMessageDeflate` (`Object|Boolean`): parameters of the WebSocket permessage-deflate extension + (see [ws module](https://github.com/einaros/ws) api docs). Set to `false` to disable. (`true`) + - `threshold` (`Number`): data is compressed only if the byte size is above this value. This option is ignored on the browser. (`1024`) + - `extraHeaders` (`Object`): Headers that will be passed for each request to the server (via xhr-polling and via websockets). These values then can be used during handshake or for special proxies. Can only be used in Node.js client environment. + - `onlyBinaryUpgrades` (`Boolean`): whether transport upgrades should be restricted to transports supporting binary data (`false`) + - `forceNode` (`Boolean`): Uses NodeJS implementation for websockets - even if there is a native Browser-Websocket available, which is preferred by default over the NodeJS implementation. (This is useful when using hybrid platforms like nw.js or electron) (`false`, NodeJS only) + - `localAddress` (`String`): the local IP address to connect to + - **Polling-only options** + - `requestTimeout` (`Number`): Timeout for xhr-polling requests in milliseconds (`0`) + - **Websocket-only options** + - `protocols` (`Array`): a list of subprotocols (see [MDN reference](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#Subprotocols)) +- `send` + - Sends a message to the server + - **Parameters** + - `String` | `ArrayBuffer` | `ArrayBufferView` | `Blob`: data to send + - `Object`: optional, options object + - `Function`: optional, callback upon `drain` + - **Options** + - `compress` (`Boolean`): whether to compress sending data. This option is ignored and forced to be `true` on the browser. (`true`) +- `close` + - Disconnects the client. + +### Transport + +The transport class. Private. _Inherits from EventEmitter_. + +#### Events + +- `poll`: emitted by polling transports upon starting a new request +- `pollComplete`: emitted by polling transports upon completing a request +- `drain`: emitted by polling transports upon a buffer drain + +## Tests + +`engine.io-client` is used to test +[engine](http://github.com/socketio/engine.io). Running the `engine.io` +test suite ensures the client works and vice-versa. + +Browser tests are run using [zuul](https://github.com/defunctzombie/zuul). You can +run the tests locally using the following command. + +``` +./node_modules/.bin/zuul --local 8080 -- test/index.js +``` + +Additionally, `engine.io-client` has a standalone test suite you can run +with `make test` which will run node.js and browser tests. You must have zuul setup with +a saucelabs account. + +## Support + +The support channels for `engine.io-client` are the same as `socket.io`: + - irc.freenode.net **#socket.io** + - [Google Groups](http://groups.google.com/group/socket_io) + - [Website](http://socket.io) + +## Development + +To contribute patches, run tests or benchmarks, make sure to clone the +repository: + +```bash +git clone git://github.com/socketio/engine.io-client.git +``` + +Then: + +```bash +cd engine.io-client +npm install +``` + +See the `Tests` section above for how to run tests before submitting any patches. + +## License + +MIT - Copyright (c) 2014 Automattic, Inc. diff --git a/Server File/node_modules/engine.io-client/engine.io.js b/Server File/node_modules/engine.io-client/engine.io.js new file mode 100644 index 0000000..4087060 --- /dev/null +++ b/Server File/node_modules/engine.io-client/engine.io.js @@ -0,0 +1,4707 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["eio"] = factory(); + else + root["eio"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + module.exports = __webpack_require__(1); + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + module.exports = __webpack_require__(2); + + /** + * Exports parser + * + * @api public + * + */ + module.exports.parser = __webpack_require__(9); + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(global) {'use strict'; + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + + /** + * Module dependencies. + */ + + var transports = __webpack_require__(3); + var Emitter = __webpack_require__(19); + var debug = __webpack_require__(23)('engine.io-client:socket'); + var index = __webpack_require__(30); + var parser = __webpack_require__(9); + var parseuri = __webpack_require__(31); + var parsejson = __webpack_require__(32); + var parseqs = __webpack_require__(20); + + /** + * Module exports. + */ + + module.exports = Socket; + + /** + * Socket constructor. + * + * @param {String|Object} uri or options + * @param {Object} options + * @api public + */ + + function Socket(uri, opts) { + if (!(this instanceof Socket)) return new Socket(uri, opts); + + opts = opts || {}; + + if (uri && 'object' === (typeof uri === 'undefined' ? 'undefined' : _typeof(uri))) { + opts = uri; + uri = null; + } + + if (uri) { + uri = parseuri(uri); + opts.hostname = uri.host; + opts.secure = uri.protocol === 'https' || uri.protocol === 'wss'; + opts.port = uri.port; + if (uri.query) opts.query = uri.query; + } else if (opts.host) { + opts.hostname = parseuri(opts.host).host; + } + + this.secure = null != opts.secure ? opts.secure : global.location && 'https:' === location.protocol; + + if (opts.hostname && !opts.port) { + // if no port is specified manually, use the protocol default + opts.port = this.secure ? '443' : '80'; + } + + this.agent = opts.agent || false; + this.hostname = opts.hostname || (global.location ? location.hostname : 'localhost'); + this.port = opts.port || (global.location && location.port ? location.port : this.secure ? 443 : 80); + this.query = opts.query || {}; + if ('string' === typeof this.query) this.query = parseqs.decode(this.query); + this.upgrade = false !== opts.upgrade; + this.path = (opts.path || '/engine.io').replace(/\/$/, '') + '/'; + this.forceJSONP = !!opts.forceJSONP; + this.jsonp = false !== opts.jsonp; + this.forceBase64 = !!opts.forceBase64; + this.enablesXDR = !!opts.enablesXDR; + this.timestampParam = opts.timestampParam || 't'; + this.timestampRequests = opts.timestampRequests; + this.transports = opts.transports || ['polling', 'websocket']; + this.transportOptions = opts.transportOptions || {}; + this.readyState = ''; + this.writeBuffer = []; + this.prevBufferLen = 0; + this.policyPort = opts.policyPort || 843; + this.rememberUpgrade = opts.rememberUpgrade || false; + this.binaryType = null; + this.onlyBinaryUpgrades = opts.onlyBinaryUpgrades; + this.perMessageDeflate = false !== opts.perMessageDeflate ? opts.perMessageDeflate || {} : false; + + if (true === this.perMessageDeflate) this.perMessageDeflate = {}; + if (this.perMessageDeflate && null == this.perMessageDeflate.threshold) { + this.perMessageDeflate.threshold = 1024; + } + + // SSL options for Node.js client + this.pfx = opts.pfx || null; + this.key = opts.key || null; + this.passphrase = opts.passphrase || null; + this.cert = opts.cert || null; + this.ca = opts.ca || null; + this.ciphers = opts.ciphers || null; + this.rejectUnauthorized = opts.rejectUnauthorized === undefined ? true : opts.rejectUnauthorized; + this.forceNode = !!opts.forceNode; + + // other options for Node.js client + var freeGlobal = (typeof global === 'undefined' ? 'undefined' : _typeof(global)) === 'object' && global; + if (freeGlobal.global === freeGlobal) { + if (opts.extraHeaders && Object.keys(opts.extraHeaders).length > 0) { + this.extraHeaders = opts.extraHeaders; + } + + if (opts.localAddress) { + this.localAddress = opts.localAddress; + } + } + + // set on handshake + this.id = null; + this.upgrades = null; + this.pingInterval = null; + this.pingTimeout = null; + + // set on heartbeat + this.pingIntervalTimer = null; + this.pingTimeoutTimer = null; + + this.open(); + } + + Socket.priorWebsocketSuccess = false; + + /** + * Mix in `Emitter`. + */ + + Emitter(Socket.prototype); + + /** + * Protocol version. + * + * @api public + */ + + Socket.protocol = parser.protocol; // this is an int + + /** + * Expose deps for legacy compatibility + * and standalone browser access. + */ + + Socket.Socket = Socket; + Socket.Transport = __webpack_require__(8); + Socket.transports = __webpack_require__(3); + Socket.parser = __webpack_require__(9); + + /** + * Creates transport of the given type. + * + * @param {String} transport name + * @return {Transport} + * @api private + */ + + Socket.prototype.createTransport = function (name) { + debug('creating transport "%s"', name); + var query = clone(this.query); + + // append engine.io protocol identifier + query.EIO = parser.protocol; + + // transport name + query.transport = name; + + // per-transport options + var options = this.transportOptions[name] || {}; + + // session id if we already have one + if (this.id) query.sid = this.id; + + var transport = new transports[name]({ + query: query, + socket: this, + agent: options.agent || this.agent, + hostname: options.hostname || this.hostname, + port: options.port || this.port, + secure: options.secure || this.secure, + path: options.path || this.path, + forceJSONP: options.forceJSONP || this.forceJSONP, + jsonp: options.jsonp || this.jsonp, + forceBase64: options.forceBase64 || this.forceBase64, + enablesXDR: options.enablesXDR || this.enablesXDR, + timestampRequests: options.timestampRequests || this.timestampRequests, + timestampParam: options.timestampParam || this.timestampParam, + policyPort: options.policyPort || this.policyPort, + pfx: options.pfx || this.pfx, + key: options.key || this.key, + passphrase: options.passphrase || this.passphrase, + cert: options.cert || this.cert, + ca: options.ca || this.ca, + ciphers: options.ciphers || this.ciphers, + rejectUnauthorized: options.rejectUnauthorized || this.rejectUnauthorized, + perMessageDeflate: options.perMessageDeflate || this.perMessageDeflate, + extraHeaders: options.extraHeaders || this.extraHeaders, + forceNode: options.forceNode || this.forceNode, + localAddress: options.localAddress || this.localAddress, + requestTimeout: options.requestTimeout || this.requestTimeout, + protocols: options.protocols || void 0 + }); + + return transport; + }; + + function clone(obj) { + var o = {}; + for (var i in obj) { + if (obj.hasOwnProperty(i)) { + o[i] = obj[i]; + } + } + return o; + } + + /** + * Initializes transport to use and starts probe. + * + * @api private + */ + Socket.prototype.open = function () { + var transport; + if (this.rememberUpgrade && Socket.priorWebsocketSuccess && this.transports.indexOf('websocket') !== -1) { + transport = 'websocket'; + } else if (0 === this.transports.length) { + // Emit error on next tick so it can be listened to + var self = this; + setTimeout(function () { + self.emit('error', 'No transports available'); + }, 0); + return; + } else { + transport = this.transports[0]; + } + this.readyState = 'opening'; + + // Retry with the next transport if the transport is disabled (jsonp: false) + try { + transport = this.createTransport(transport); + } catch (e) { + this.transports.shift(); + this.open(); + return; + } + + transport.open(); + this.setTransport(transport); + }; + + /** + * Sets the current transport. Disables the existing one (if any). + * + * @api private + */ + + Socket.prototype.setTransport = function (transport) { + debug('setting transport %s', transport.name); + var self = this; + + if (this.transport) { + debug('clearing existing transport %s', this.transport.name); + this.transport.removeAllListeners(); + } + + // set up transport + this.transport = transport; + + // set up transport listeners + transport.on('drain', function () { + self.onDrain(); + }).on('packet', function (packet) { + self.onPacket(packet); + }).on('error', function (e) { + self.onError(e); + }).on('close', function () { + self.onClose('transport close'); + }); + }; + + /** + * Probes a transport. + * + * @param {String} transport name + * @api private + */ + + Socket.prototype.probe = function (name) { + debug('probing transport "%s"', name); + var transport = this.createTransport(name, { probe: 1 }); + var failed = false; + var self = this; + + Socket.priorWebsocketSuccess = false; + + function onTransportOpen() { + if (self.onlyBinaryUpgrades) { + var upgradeLosesBinary = !this.supportsBinary && self.transport.supportsBinary; + failed = failed || upgradeLosesBinary; + } + if (failed) return; + + debug('probe transport "%s" opened', name); + transport.send([{ type: 'ping', data: 'probe' }]); + transport.once('packet', function (msg) { + if (failed) return; + if ('pong' === msg.type && 'probe' === msg.data) { + debug('probe transport "%s" pong', name); + self.upgrading = true; + self.emit('upgrading', transport); + if (!transport) return; + Socket.priorWebsocketSuccess = 'websocket' === transport.name; + + debug('pausing current transport "%s"', self.transport.name); + self.transport.pause(function () { + if (failed) return; + if ('closed' === self.readyState) return; + debug('changing transport and sending upgrade packet'); + + cleanup(); + + self.setTransport(transport); + transport.send([{ type: 'upgrade' }]); + self.emit('upgrade', transport); + transport = null; + self.upgrading = false; + self.flush(); + }); + } else { + debug('probe transport "%s" failed', name); + var err = new Error('probe error'); + err.transport = transport.name; + self.emit('upgradeError', err); + } + }); + } + + function freezeTransport() { + if (failed) return; + + // Any callback called by transport should be ignored since now + failed = true; + + cleanup(); + + transport.close(); + transport = null; + } + + // Handle any error that happens while probing + function onerror(err) { + var error = new Error('probe error: ' + err); + error.transport = transport.name; + + freezeTransport(); + + debug('probe transport "%s" failed because of error: %s', name, err); + + self.emit('upgradeError', error); + } + + function onTransportClose() { + onerror('transport closed'); + } + + // When the socket is closed while we're probing + function onclose() { + onerror('socket closed'); + } + + // When the socket is upgraded while we're probing + function onupgrade(to) { + if (transport && to.name !== transport.name) { + debug('"%s" works - aborting "%s"', to.name, transport.name); + freezeTransport(); + } + } + + // Remove all listeners on the transport and on self + function cleanup() { + transport.removeListener('open', onTransportOpen); + transport.removeListener('error', onerror); + transport.removeListener('close', onTransportClose); + self.removeListener('close', onclose); + self.removeListener('upgrading', onupgrade); + } + + transport.once('open', onTransportOpen); + transport.once('error', onerror); + transport.once('close', onTransportClose); + + this.once('close', onclose); + this.once('upgrading', onupgrade); + + transport.open(); + }; + + /** + * Called when connection is deemed open. + * + * @api public + */ + + Socket.prototype.onOpen = function () { + debug('socket open'); + this.readyState = 'open'; + Socket.priorWebsocketSuccess = 'websocket' === this.transport.name; + this.emit('open'); + this.flush(); + + // we check for `readyState` in case an `open` + // listener already closed the socket + if ('open' === this.readyState && this.upgrade && this.transport.pause) { + debug('starting upgrade probes'); + for (var i = 0, l = this.upgrades.length; i < l; i++) { + this.probe(this.upgrades[i]); + } + } + }; + + /** + * Handles a packet. + * + * @api private + */ + + Socket.prototype.onPacket = function (packet) { + if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState) { + debug('socket receive: type "%s", data "%s"', packet.type, packet.data); + + this.emit('packet', packet); + + // Socket is live - any packet counts + this.emit('heartbeat'); + + switch (packet.type) { + case 'open': + this.onHandshake(parsejson(packet.data)); + break; + + case 'pong': + this.setPing(); + this.emit('pong'); + break; + + case 'error': + var err = new Error('server error'); + err.code = packet.data; + this.onError(err); + break; + + case 'message': + this.emit('data', packet.data); + this.emit('message', packet.data); + break; + } + } else { + debug('packet received with socket readyState "%s"', this.readyState); + } + }; + + /** + * Called upon handshake completion. + * + * @param {Object} handshake obj + * @api private + */ + + Socket.prototype.onHandshake = function (data) { + this.emit('handshake', data); + this.id = data.sid; + this.transport.query.sid = data.sid; + this.upgrades = this.filterUpgrades(data.upgrades); + this.pingInterval = data.pingInterval; + this.pingTimeout = data.pingTimeout; + this.onOpen(); + // In case open handler closes socket + if ('closed' === this.readyState) return; + this.setPing(); + + // Prolong liveness of socket on heartbeat + this.removeListener('heartbeat', this.onHeartbeat); + this.on('heartbeat', this.onHeartbeat); + }; + + /** + * Resets ping timeout. + * + * @api private + */ + + Socket.prototype.onHeartbeat = function (timeout) { + clearTimeout(this.pingTimeoutTimer); + var self = this; + self.pingTimeoutTimer = setTimeout(function () { + if ('closed' === self.readyState) return; + self.onClose('ping timeout'); + }, timeout || self.pingInterval + self.pingTimeout); + }; + + /** + * Pings server every `this.pingInterval` and expects response + * within `this.pingTimeout` or closes connection. + * + * @api private + */ + + Socket.prototype.setPing = function () { + var self = this; + clearTimeout(self.pingIntervalTimer); + self.pingIntervalTimer = setTimeout(function () { + debug('writing ping packet - expecting pong within %sms', self.pingTimeout); + self.ping(); + self.onHeartbeat(self.pingTimeout); + }, self.pingInterval); + }; + + /** + * Sends a ping packet. + * + * @api private + */ + + Socket.prototype.ping = function () { + var self = this; + this.sendPacket('ping', function () { + self.emit('ping'); + }); + }; + + /** + * Called on `drain` event + * + * @api private + */ + + Socket.prototype.onDrain = function () { + this.writeBuffer.splice(0, this.prevBufferLen); + + // setting prevBufferLen = 0 is very important + // for example, when upgrading, upgrade packet is sent over, + // and a nonzero prevBufferLen could cause problems on `drain` + this.prevBufferLen = 0; + + if (0 === this.writeBuffer.length) { + this.emit('drain'); + } else { + this.flush(); + } + }; + + /** + * Flush write buffers. + * + * @api private + */ + + Socket.prototype.flush = function () { + if ('closed' !== this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length) { + debug('flushing %d packets in socket', this.writeBuffer.length); + this.transport.send(this.writeBuffer); + // keep track of current length of writeBuffer + // splice writeBuffer and callbackBuffer on `drain` + this.prevBufferLen = this.writeBuffer.length; + this.emit('flush'); + } + }; + + /** + * Sends a message. + * + * @param {String} message. + * @param {Function} callback function. + * @param {Object} options. + * @return {Socket} for chaining. + * @api public + */ + + Socket.prototype.write = Socket.prototype.send = function (msg, options, fn) { + this.sendPacket('message', msg, options, fn); + return this; + }; + + /** + * Sends a packet. + * + * @param {String} packet type. + * @param {String} data. + * @param {Object} options. + * @param {Function} callback function. + * @api private + */ + + Socket.prototype.sendPacket = function (type, data, options, fn) { + if ('function' === typeof data) { + fn = data; + data = undefined; + } + + if ('function' === typeof options) { + fn = options; + options = null; + } + + if ('closing' === this.readyState || 'closed' === this.readyState) { + return; + } + + options = options || {}; + options.compress = false !== options.compress; + + var packet = { + type: type, + data: data, + options: options + }; + this.emit('packetCreate', packet); + this.writeBuffer.push(packet); + if (fn) this.once('flush', fn); + this.flush(); + }; + + /** + * Closes the connection. + * + * @api private + */ + + Socket.prototype.close = function () { + if ('opening' === this.readyState || 'open' === this.readyState) { + this.readyState = 'closing'; + + var self = this; + + if (this.writeBuffer.length) { + this.once('drain', function () { + if (this.upgrading) { + waitForUpgrade(); + } else { + close(); + } + }); + } else if (this.upgrading) { + waitForUpgrade(); + } else { + close(); + } + } + + function close() { + self.onClose('forced close'); + debug('socket closing - telling transport to close'); + self.transport.close(); + } + + function cleanupAndClose() { + self.removeListener('upgrade', cleanupAndClose); + self.removeListener('upgradeError', cleanupAndClose); + close(); + } + + function waitForUpgrade() { + // wait for upgrade to finish since we can't send packets while pausing a transport + self.once('upgrade', cleanupAndClose); + self.once('upgradeError', cleanupAndClose); + } + + return this; + }; + + /** + * Called upon transport error + * + * @api private + */ + + Socket.prototype.onError = function (err) { + debug('socket error %j', err); + Socket.priorWebsocketSuccess = false; + this.emit('error', err); + this.onClose('transport error', err); + }; + + /** + * Called upon transport close. + * + * @api private + */ + + Socket.prototype.onClose = function (reason, desc) { + if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState) { + debug('socket close with reason: "%s"', reason); + var self = this; + + // clear timers + clearTimeout(this.pingIntervalTimer); + clearTimeout(this.pingTimeoutTimer); + + // stop event from firing again for transport + this.transport.removeAllListeners('close'); + + // ensure transport won't stay open + this.transport.close(); + + // ignore further transport communication + this.transport.removeAllListeners(); + + // set ready state + this.readyState = 'closed'; + + // clear session id + this.id = null; + + // emit close event + this.emit('close', reason, desc); + + // clean buffers after, so users can still + // grab the buffers on `close` event + self.writeBuffer = []; + self.prevBufferLen = 0; + } + }; + + /** + * Filters upgrades, returning only those matching client transports. + * + * @param {Array} server upgrades + * @api private + * + */ + + Socket.prototype.filterUpgrades = function (upgrades) { + var filteredUpgrades = []; + for (var i = 0, j = upgrades.length; i < j; i++) { + if (~index(this.transports, upgrades[i])) filteredUpgrades.push(upgrades[i]); + } + return filteredUpgrades; + }; + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(global) {'use strict'; + + /** + * Module dependencies + */ + + var XMLHttpRequest = __webpack_require__(4); + var XHR = __webpack_require__(6); + var JSONP = __webpack_require__(27); + var websocket = __webpack_require__(28); + + /** + * Export transports. + */ + + exports.polling = polling; + exports.websocket = websocket; + + /** + * Polling transport polymorphic constructor. + * Decides on xhr vs jsonp based on feature detection. + * + * @api private + */ + + function polling(opts) { + var xhr; + var xd = false; + var xs = false; + var jsonp = false !== opts.jsonp; + + if (global.location) { + var isSSL = 'https:' === location.protocol; + var port = location.port; + + // some user agents have empty `location.port` + if (!port) { + port = isSSL ? 443 : 80; + } + + xd = opts.hostname !== location.hostname || port !== opts.port; + xs = opts.secure !== isSSL; + } + + opts.xdomain = xd; + opts.xscheme = xs; + xhr = new XMLHttpRequest(opts); + + if ('open' in xhr && !opts.forceJSONP) { + return new XHR(opts); + } else { + if (!jsonp) throw new Error('JSONP disabled'); + return new JSONP(opts); + } + } + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(global) {'use strict'; + + // browser shim for xmlhttprequest module + + var hasCORS = __webpack_require__(5); + + module.exports = function (opts) { + var xdomain = opts.xdomain; + + // scheme must be same when usign XDomainRequest + // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx + var xscheme = opts.xscheme; + + // XDomainRequest has a flow of not sending cookie, therefore it should be disabled as a default. + // https://github.com/Automattic/engine.io-client/pull/217 + var enablesXDR = opts.enablesXDR; + + // XMLHttpRequest can be disabled on IE + try { + if ('undefined' !== typeof XMLHttpRequest && (!xdomain || hasCORS)) { + return new XMLHttpRequest(); + } + } catch (e) {} + + // Use XDomainRequest for IE8 if enablesXDR is true + // because loading bar keeps flashing when using jsonp-polling + // https://github.com/yujiosaka/socke.io-ie8-loading-example + try { + if ('undefined' !== typeof XDomainRequest && !xscheme && enablesXDR) { + return new XDomainRequest(); + } + } catch (e) {} + + if (!xdomain) { + try { + return new global[['Active'].concat('Object').join('X')]('Microsoft.XMLHTTP'); + } catch (e) {} + } + }; + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + + /** + * Module exports. + * + * Logic borrowed from Modernizr: + * + * - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js + */ + + try { + module.exports = typeof XMLHttpRequest !== 'undefined' && + 'withCredentials' in new XMLHttpRequest(); + } catch (err) { + // if XMLHttp support is disabled in IE then it will throw + // when trying to create + module.exports = false; + } + + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(global) {'use strict'; + + /** + * Module requirements. + */ + + var XMLHttpRequest = __webpack_require__(4); + var Polling = __webpack_require__(7); + var Emitter = __webpack_require__(19); + var inherit = __webpack_require__(21); + var debug = __webpack_require__(23)('engine.io-client:polling-xhr'); + + /** + * Module exports. + */ + + module.exports = XHR; + module.exports.Request = Request; + + /** + * Empty function + */ + + function empty() {} + + /** + * XHR Polling constructor. + * + * @param {Object} opts + * @api public + */ + + function XHR(opts) { + Polling.call(this, opts); + this.requestTimeout = opts.requestTimeout; + this.extraHeaders = opts.extraHeaders; + + if (global.location) { + var isSSL = 'https:' === location.protocol; + var port = location.port; + + // some user agents have empty `location.port` + if (!port) { + port = isSSL ? 443 : 80; + } + + this.xd = opts.hostname !== global.location.hostname || port !== opts.port; + this.xs = opts.secure !== isSSL; + } + } + + /** + * Inherits from Polling. + */ + + inherit(XHR, Polling); + + /** + * XHR supports binary + */ + + XHR.prototype.supportsBinary = true; + + /** + * Creates a request. + * + * @param {String} method + * @api private + */ + + XHR.prototype.request = function (opts) { + opts = opts || {}; + opts.uri = this.uri(); + opts.xd = this.xd; + opts.xs = this.xs; + opts.agent = this.agent || false; + opts.supportsBinary = this.supportsBinary; + opts.enablesXDR = this.enablesXDR; + + // SSL options for Node.js client + opts.pfx = this.pfx; + opts.key = this.key; + opts.passphrase = this.passphrase; + opts.cert = this.cert; + opts.ca = this.ca; + opts.ciphers = this.ciphers; + opts.rejectUnauthorized = this.rejectUnauthorized; + opts.requestTimeout = this.requestTimeout; + + // other options for Node.js client + opts.extraHeaders = this.extraHeaders; + + return new Request(opts); + }; + + /** + * Sends data. + * + * @param {String} data to send. + * @param {Function} called upon flush. + * @api private + */ + + XHR.prototype.doWrite = function (data, fn) { + var isBinary = typeof data !== 'string' && data !== undefined; + var req = this.request({ method: 'POST', data: data, isBinary: isBinary }); + var self = this; + req.on('success', fn); + req.on('error', function (err) { + self.onError('xhr post error', err); + }); + this.sendXhr = req; + }; + + /** + * Starts a poll cycle. + * + * @api private + */ + + XHR.prototype.doPoll = function () { + debug('xhr poll'); + var req = this.request(); + var self = this; + req.on('data', function (data) { + self.onData(data); + }); + req.on('error', function (err) { + self.onError('xhr poll error', err); + }); + this.pollXhr = req; + }; + + /** + * Request constructor + * + * @param {Object} options + * @api public + */ + + function Request(opts) { + this.method = opts.method || 'GET'; + this.uri = opts.uri; + this.xd = !!opts.xd; + this.xs = !!opts.xs; + this.async = false !== opts.async; + this.data = undefined !== opts.data ? opts.data : null; + this.agent = opts.agent; + this.isBinary = opts.isBinary; + this.supportsBinary = opts.supportsBinary; + this.enablesXDR = opts.enablesXDR; + this.requestTimeout = opts.requestTimeout; + + // SSL options for Node.js client + this.pfx = opts.pfx; + this.key = opts.key; + this.passphrase = opts.passphrase; + this.cert = opts.cert; + this.ca = opts.ca; + this.ciphers = opts.ciphers; + this.rejectUnauthorized = opts.rejectUnauthorized; + + // other options for Node.js client + this.extraHeaders = opts.extraHeaders; + + this.create(); + } + + /** + * Mix in `Emitter`. + */ + + Emitter(Request.prototype); + + /** + * Creates the XHR object and sends the request. + * + * @api private + */ + + Request.prototype.create = function () { + var opts = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR }; + + // SSL options for Node.js client + opts.pfx = this.pfx; + opts.key = this.key; + opts.passphrase = this.passphrase; + opts.cert = this.cert; + opts.ca = this.ca; + opts.ciphers = this.ciphers; + opts.rejectUnauthorized = this.rejectUnauthorized; + + var xhr = this.xhr = new XMLHttpRequest(opts); + var self = this; + + try { + debug('xhr open %s: %s', this.method, this.uri); + xhr.open(this.method, this.uri, this.async); + try { + if (this.extraHeaders) { + xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true); + for (var i in this.extraHeaders) { + if (this.extraHeaders.hasOwnProperty(i)) { + xhr.setRequestHeader(i, this.extraHeaders[i]); + } + } + } + } catch (e) {} + + if ('POST' === this.method) { + try { + if (this.isBinary) { + xhr.setRequestHeader('Content-type', 'application/octet-stream'); + } else { + xhr.setRequestHeader('Content-type', 'text/plain;charset=UTF-8'); + } + } catch (e) {} + } + + try { + xhr.setRequestHeader('Accept', '*/*'); + } catch (e) {} + + // ie6 check + if ('withCredentials' in xhr) { + xhr.withCredentials = true; + } + + if (this.requestTimeout) { + xhr.timeout = this.requestTimeout; + } + + if (this.hasXDR()) { + xhr.onload = function () { + self.onLoad(); + }; + xhr.onerror = function () { + self.onError(xhr.responseText); + }; + } else { + xhr.onreadystatechange = function () { + if (xhr.readyState === 2) { + var contentType; + try { + contentType = xhr.getResponseHeader('Content-Type'); + } catch (e) {} + if (contentType === 'application/octet-stream') { + xhr.responseType = 'arraybuffer'; + } + } + if (4 !== xhr.readyState) return; + if (200 === xhr.status || 1223 === xhr.status) { + self.onLoad(); + } else { + // make sure the `error` event handler that's user-set + // does not throw in the same tick and gets caught here + setTimeout(function () { + self.onError(xhr.status); + }, 0); + } + }; + } + + debug('xhr data %s', this.data); + xhr.send(this.data); + } catch (e) { + // Need to defer since .create() is called directly fhrom the constructor + // and thus the 'error' event can only be only bound *after* this exception + // occurs. Therefore, also, we cannot throw here at all. + setTimeout(function () { + self.onError(e); + }, 0); + return; + } + + if (global.document) { + this.index = Request.requestsCount++; + Request.requests[this.index] = this; + } + }; + + /** + * Called upon successful response. + * + * @api private + */ + + Request.prototype.onSuccess = function () { + this.emit('success'); + this.cleanup(); + }; + + /** + * Called if we have data. + * + * @api private + */ + + Request.prototype.onData = function (data) { + this.emit('data', data); + this.onSuccess(); + }; + + /** + * Called upon error. + * + * @api private + */ + + Request.prototype.onError = function (err) { + this.emit('error', err); + this.cleanup(true); + }; + + /** + * Cleans up house. + * + * @api private + */ + + Request.prototype.cleanup = function (fromError) { + if ('undefined' === typeof this.xhr || null === this.xhr) { + return; + } + // xmlhttprequest + if (this.hasXDR()) { + this.xhr.onload = this.xhr.onerror = empty; + } else { + this.xhr.onreadystatechange = empty; + } + + if (fromError) { + try { + this.xhr.abort(); + } catch (e) {} + } + + if (global.document) { + delete Request.requests[this.index]; + } + + this.xhr = null; + }; + + /** + * Called upon load. + * + * @api private + */ + + Request.prototype.onLoad = function () { + var data; + try { + var contentType; + try { + contentType = this.xhr.getResponseHeader('Content-Type'); + } catch (e) {} + if (contentType === 'application/octet-stream') { + data = this.xhr.response || this.xhr.responseText; + } else { + data = this.xhr.responseText; + } + } catch (e) { + this.onError(e); + } + if (null != data) { + this.onData(data); + } + }; + + /** + * Check if it has XDomainRequest. + * + * @api private + */ + + Request.prototype.hasXDR = function () { + return 'undefined' !== typeof global.XDomainRequest && !this.xs && this.enablesXDR; + }; + + /** + * Aborts the request. + * + * @api public + */ + + Request.prototype.abort = function () { + this.cleanup(); + }; + + /** + * Aborts pending requests when unloading the window. This is needed to prevent + * memory leaks (e.g. when using IE) and to ensure that no spurious error is + * emitted. + */ + + Request.requestsCount = 0; + Request.requests = {}; + + if (global.document) { + if (global.attachEvent) { + global.attachEvent('onunload', unloadHandler); + } else if (global.addEventListener) { + global.addEventListener('beforeunload', unloadHandler, false); + } + } + + function unloadHandler() { + for (var i in Request.requests) { + if (Request.requests.hasOwnProperty(i)) { + Request.requests[i].abort(); + } + } + } + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + /** + * Module dependencies. + */ + + var Transport = __webpack_require__(8); + var parseqs = __webpack_require__(20); + var parser = __webpack_require__(9); + var inherit = __webpack_require__(21); + var yeast = __webpack_require__(22); + var debug = __webpack_require__(23)('engine.io-client:polling'); + + /** + * Module exports. + */ + + module.exports = Polling; + + /** + * Is XHR2 supported? + */ + + var hasXHR2 = function () { + var XMLHttpRequest = __webpack_require__(4); + var xhr = new XMLHttpRequest({ xdomain: false }); + return null != xhr.responseType; + }(); + + /** + * Polling interface. + * + * @param {Object} opts + * @api private + */ + + function Polling(opts) { + var forceBase64 = opts && opts.forceBase64; + if (!hasXHR2 || forceBase64) { + this.supportsBinary = false; + } + Transport.call(this, opts); + } + + /** + * Inherits from Transport. + */ + + inherit(Polling, Transport); + + /** + * Transport name. + */ + + Polling.prototype.name = 'polling'; + + /** + * Opens the socket (triggers polling). We write a PING message to determine + * when the transport is open. + * + * @api private + */ + + Polling.prototype.doOpen = function () { + this.poll(); + }; + + /** + * Pauses polling. + * + * @param {Function} callback upon buffers are flushed and transport is paused + * @api private + */ + + Polling.prototype.pause = function (onPause) { + var self = this; + + this.readyState = 'pausing'; + + function pause() { + debug('paused'); + self.readyState = 'paused'; + onPause(); + } + + if (this.polling || !this.writable) { + var total = 0; + + if (this.polling) { + debug('we are currently polling - waiting to pause'); + total++; + this.once('pollComplete', function () { + debug('pre-pause polling complete'); + --total || pause(); + }); + } + + if (!this.writable) { + debug('we are currently writing - waiting to pause'); + total++; + this.once('drain', function () { + debug('pre-pause writing complete'); + --total || pause(); + }); + } + } else { + pause(); + } + }; + + /** + * Starts polling cycle. + * + * @api public + */ + + Polling.prototype.poll = function () { + debug('polling'); + this.polling = true; + this.doPoll(); + this.emit('poll'); + }; + + /** + * Overloads onData to detect payloads. + * + * @api private + */ + + Polling.prototype.onData = function (data) { + var self = this; + debug('polling got data %s', data); + var callback = function callback(packet, index, total) { + // if its the first message we consider the transport open + if ('opening' === self.readyState) { + self.onOpen(); + } + + // if its a close packet, we close the ongoing requests + if ('close' === packet.type) { + self.onClose(); + return false; + } + + // otherwise bypass onData and handle the message + self.onPacket(packet); + }; + + // decode payload + parser.decodePayload(data, this.socket.binaryType, callback); + + // if an event did not trigger closing + if ('closed' !== this.readyState) { + // if we got data we're not polling + this.polling = false; + this.emit('pollComplete'); + + if ('open' === this.readyState) { + this.poll(); + } else { + debug('ignoring poll - transport state "%s"', this.readyState); + } + } + }; + + /** + * For polling, send a close packet. + * + * @api private + */ + + Polling.prototype.doClose = function () { + var self = this; + + function close() { + debug('writing close packet'); + self.write([{ type: 'close' }]); + } + + if ('open' === this.readyState) { + debug('transport open - closing'); + close(); + } else { + // in case we're trying to close while + // handshaking is in progress (GH-164) + debug('transport not open - deferring close'); + this.once('open', close); + } + }; + + /** + * Writes a packets payload. + * + * @param {Array} data packets + * @param {Function} drain callback + * @api private + */ + + Polling.prototype.write = function (packets) { + var self = this; + this.writable = false; + var callbackfn = function callbackfn() { + self.writable = true; + self.emit('drain'); + }; + + parser.encodePayload(packets, this.supportsBinary, function (data) { + self.doWrite(data, callbackfn); + }); + }; + + /** + * Generates uri for connection. + * + * @api private + */ + + Polling.prototype.uri = function () { + var query = this.query || {}; + var schema = this.secure ? 'https' : 'http'; + var port = ''; + + // cache busting is forced + if (false !== this.timestampRequests) { + query[this.timestampParam] = yeast(); + } + + if (!this.supportsBinary && !query.sid) { + query.b64 = 1; + } + + query = parseqs.encode(query); + + // avoid port if default for schema + if (this.port && ('https' === schema && Number(this.port) !== 443 || 'http' === schema && Number(this.port) !== 80)) { + port = ':' + this.port; + } + + // prepend ? to query + if (query.length) { + query = '?' + query; + } + + var ipv6 = this.hostname.indexOf(':') !== -1; + return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query; + }; + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + /** + * Module dependencies. + */ + + var parser = __webpack_require__(9); + var Emitter = __webpack_require__(19); + + /** + * Module exports. + */ + + module.exports = Transport; + + /** + * Transport abstract constructor. + * + * @param {Object} options. + * @api private + */ + + function Transport(opts) { + this.path = opts.path; + this.hostname = opts.hostname; + this.port = opts.port; + this.secure = opts.secure; + this.query = opts.query; + this.timestampParam = opts.timestampParam; + this.timestampRequests = opts.timestampRequests; + this.readyState = ''; + this.agent = opts.agent || false; + this.socket = opts.socket; + this.enablesXDR = opts.enablesXDR; + + // SSL options for Node.js client + this.pfx = opts.pfx; + this.key = opts.key; + this.passphrase = opts.passphrase; + this.cert = opts.cert; + this.ca = opts.ca; + this.ciphers = opts.ciphers; + this.rejectUnauthorized = opts.rejectUnauthorized; + this.forceNode = opts.forceNode; + + // other options for Node.js client + this.extraHeaders = opts.extraHeaders; + this.localAddress = opts.localAddress; + } + + /** + * Mix in `Emitter`. + */ + + Emitter(Transport.prototype); + + /** + * Emits an error. + * + * @param {String} str + * @return {Transport} for chaining + * @api public + */ + + Transport.prototype.onError = function (msg, desc) { + var err = new Error(msg); + err.type = 'TransportError'; + err.description = desc; + this.emit('error', err); + return this; + }; + + /** + * Opens the transport. + * + * @api public + */ + + Transport.prototype.open = function () { + if ('closed' === this.readyState || '' === this.readyState) { + this.readyState = 'opening'; + this.doOpen(); + } + + return this; + }; + + /** + * Closes the transport. + * + * @api private + */ + + Transport.prototype.close = function () { + if ('opening' === this.readyState || 'open' === this.readyState) { + this.doClose(); + this.onClose(); + } + + return this; + }; + + /** + * Sends multiple packets. + * + * @param {Array} packets + * @api private + */ + + Transport.prototype.send = function (packets) { + if ('open' === this.readyState) { + this.write(packets); + } else { + throw new Error('Transport not open'); + } + }; + + /** + * Called upon open + * + * @api private + */ + + Transport.prototype.onOpen = function () { + this.readyState = 'open'; + this.writable = true; + this.emit('open'); + }; + + /** + * Called with data. + * + * @param {String} data + * @api private + */ + + Transport.prototype.onData = function (data) { + var packet = parser.decodePacket(data, this.socket.binaryType); + this.onPacket(packet); + }; + + /** + * Called with a decoded packet. + */ + + Transport.prototype.onPacket = function (packet) { + this.emit('packet', packet); + }; + + /** + * Called upon close. + * + * @api private + */ + + Transport.prototype.onClose = function () { + this.readyState = 'closed'; + this.emit('close'); + }; + +/***/ }, +/* 9 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(global) {/** + * Module dependencies. + */ + + var keys = __webpack_require__(10); + var hasBinary = __webpack_require__(11); + var sliceBuffer = __webpack_require__(13); + var after = __webpack_require__(14); + var utf8 = __webpack_require__(15); + + var base64encoder; + if (global && global.ArrayBuffer) { + base64encoder = __webpack_require__(17); + } + + /** + * Check if we are running an android browser. That requires us to use + * ArrayBuffer with polling transports... + * + * http://ghinda.net/jpeg-blob-ajax-android/ + */ + + var isAndroid = typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent); + + /** + * Check if we are running in PhantomJS. + * Uploading a Blob with PhantomJS does not work correctly, as reported here: + * https://github.com/ariya/phantomjs/issues/11395 + * @type boolean + */ + var isPhantomJS = typeof navigator !== 'undefined' && /PhantomJS/i.test(navigator.userAgent); + + /** + * When true, avoids using Blobs to encode payloads. + * @type boolean + */ + var dontSendBlobs = isAndroid || isPhantomJS; + + /** + * Current protocol version. + */ + + exports.protocol = 3; + + /** + * Packet types. + */ + + var packets = exports.packets = { + open: 0 // non-ws + , close: 1 // non-ws + , ping: 2 + , pong: 3 + , message: 4 + , upgrade: 5 + , noop: 6 + }; + + var packetslist = keys(packets); + + /** + * Premade error packet. + */ + + var err = { type: 'error', data: 'parser error' }; + + /** + * Create a blob api even for blob builder when vendor prefixes exist + */ + + var Blob = __webpack_require__(18); + + /** + * Encodes a packet. + * + * [ ] + * + * Example: + * + * 5hello world + * 3 + * 4 + * + * Binary is encoded in an identical principle + * + * @api private + */ + + exports.encodePacket = function (packet, supportsBinary, utf8encode, callback) { + if (typeof supportsBinary === 'function') { + callback = supportsBinary; + supportsBinary = false; + } + + if (typeof utf8encode === 'function') { + callback = utf8encode; + utf8encode = null; + } + + var data = (packet.data === undefined) + ? undefined + : packet.data.buffer || packet.data; + + if (global.ArrayBuffer && data instanceof ArrayBuffer) { + return encodeArrayBuffer(packet, supportsBinary, callback); + } else if (Blob && data instanceof global.Blob) { + return encodeBlob(packet, supportsBinary, callback); + } + + // might be an object with { base64: true, data: dataAsBase64String } + if (data && data.base64) { + return encodeBase64Object(packet, callback); + } + + // Sending data as a utf-8 string + var encoded = packets[packet.type]; + + // data fragment is optional + if (undefined !== packet.data) { + encoded += utf8encode ? utf8.encode(String(packet.data), { strict: false }) : String(packet.data); + } + + return callback('' + encoded); + + }; + + function encodeBase64Object(packet, callback) { + // packet data is an object { base64: true, data: dataAsBase64String } + var message = 'b' + exports.packets[packet.type] + packet.data.data; + return callback(message); + } + + /** + * Encode packet helpers for binary types + */ + + function encodeArrayBuffer(packet, supportsBinary, callback) { + if (!supportsBinary) { + return exports.encodeBase64Packet(packet, callback); + } + + var data = packet.data; + var contentArray = new Uint8Array(data); + var resultBuffer = new Uint8Array(1 + data.byteLength); + + resultBuffer[0] = packets[packet.type]; + for (var i = 0; i < contentArray.length; i++) { + resultBuffer[i+1] = contentArray[i]; + } + + return callback(resultBuffer.buffer); + } + + function encodeBlobAsArrayBuffer(packet, supportsBinary, callback) { + if (!supportsBinary) { + return exports.encodeBase64Packet(packet, callback); + } + + var fr = new FileReader(); + fr.onload = function() { + packet.data = fr.result; + exports.encodePacket(packet, supportsBinary, true, callback); + }; + return fr.readAsArrayBuffer(packet.data); + } + + function encodeBlob(packet, supportsBinary, callback) { + if (!supportsBinary) { + return exports.encodeBase64Packet(packet, callback); + } + + if (dontSendBlobs) { + return encodeBlobAsArrayBuffer(packet, supportsBinary, callback); + } + + var length = new Uint8Array(1); + length[0] = packets[packet.type]; + var blob = new Blob([length.buffer, packet.data]); + + return callback(blob); + } + + /** + * Encodes a packet with binary data in a base64 string + * + * @param {Object} packet, has `type` and `data` + * @return {String} base64 encoded message + */ + + exports.encodeBase64Packet = function(packet, callback) { + var message = 'b' + exports.packets[packet.type]; + if (Blob && packet.data instanceof global.Blob) { + var fr = new FileReader(); + fr.onload = function() { + var b64 = fr.result.split(',')[1]; + callback(message + b64); + }; + return fr.readAsDataURL(packet.data); + } + + var b64data; + try { + b64data = String.fromCharCode.apply(null, new Uint8Array(packet.data)); + } catch (e) { + // iPhone Safari doesn't let you apply with typed arrays + var typed = new Uint8Array(packet.data); + var basic = new Array(typed.length); + for (var i = 0; i < typed.length; i++) { + basic[i] = typed[i]; + } + b64data = String.fromCharCode.apply(null, basic); + } + message += global.btoa(b64data); + return callback(message); + }; + + /** + * Decodes a packet. Changes format to Blob if requested. + * + * @return {Object} with `type` and `data` (if any) + * @api private + */ + + exports.decodePacket = function (data, binaryType, utf8decode) { + if (data === undefined) { + return err; + } + // String data + if (typeof data === 'string') { + if (data.charAt(0) === 'b') { + return exports.decodeBase64Packet(data.substr(1), binaryType); + } + + if (utf8decode) { + data = tryDecode(data); + if (data === false) { + return err; + } + } + var type = data.charAt(0); + + if (Number(type) != type || !packetslist[type]) { + return err; + } + + if (data.length > 1) { + return { type: packetslist[type], data: data.substring(1) }; + } else { + return { type: packetslist[type] }; + } + } + + var asArray = new Uint8Array(data); + var type = asArray[0]; + var rest = sliceBuffer(data, 1); + if (Blob && binaryType === 'blob') { + rest = new Blob([rest]); + } + return { type: packetslist[type], data: rest }; + }; + + function tryDecode(data) { + try { + data = utf8.decode(data, { strict: false }); + } catch (e) { + return false; + } + return data; + } + + /** + * Decodes a packet encoded in a base64 string + * + * @param {String} base64 encoded message + * @return {Object} with `type` and `data` (if any) + */ + + exports.decodeBase64Packet = function(msg, binaryType) { + var type = packetslist[msg.charAt(0)]; + if (!base64encoder) { + return { type: type, data: { base64: true, data: msg.substr(1) } }; + } + + var data = base64encoder.decode(msg.substr(1)); + + if (binaryType === 'blob' && Blob) { + data = new Blob([data]); + } + + return { type: type, data: data }; + }; + + /** + * Encodes multiple messages (payload). + * + * :data + * + * Example: + * + * 11:hello world2:hi + * + * If any contents are binary, they will be encoded as base64 strings. Base64 + * encoded strings are marked with a b before the length specifier + * + * @param {Array} packets + * @api private + */ + + exports.encodePayload = function (packets, supportsBinary, callback) { + if (typeof supportsBinary === 'function') { + callback = supportsBinary; + supportsBinary = null; + } + + var isBinary = hasBinary(packets); + + if (supportsBinary && isBinary) { + if (Blob && !dontSendBlobs) { + return exports.encodePayloadAsBlob(packets, callback); + } + + return exports.encodePayloadAsArrayBuffer(packets, callback); + } + + if (!packets.length) { + return callback('0:'); + } + + function setLengthHeader(message) { + return message.length + ':' + message; + } + + function encodeOne(packet, doneCallback) { + exports.encodePacket(packet, !isBinary ? false : supportsBinary, false, function(message) { + doneCallback(null, setLengthHeader(message)); + }); + } + + map(packets, encodeOne, function(err, results) { + return callback(results.join('')); + }); + }; + + /** + * Async array map using after + */ + + function map(ary, each, done) { + var result = new Array(ary.length); + var next = after(ary.length, done); + + var eachWithIndex = function(i, el, cb) { + each(el, function(error, msg) { + result[i] = msg; + cb(error, result); + }); + }; + + for (var i = 0; i < ary.length; i++) { + eachWithIndex(i, ary[i], next); + } + } + + /* + * Decodes data when a payload is maybe expected. Possible binary contents are + * decoded from their base64 representation + * + * @param {String} data, callback method + * @api public + */ + + exports.decodePayload = function (data, binaryType, callback) { + if (typeof data !== 'string') { + return exports.decodePayloadAsBinary(data, binaryType, callback); + } + + if (typeof binaryType === 'function') { + callback = binaryType; + binaryType = null; + } + + var packet; + if (data === '') { + // parser error - ignoring payload + return callback(err, 0, 1); + } + + var length = '', n, msg; + + for (var i = 0, l = data.length; i < l; i++) { + var chr = data.charAt(i); + + if (chr !== ':') { + length += chr; + continue; + } + + if (length === '' || (length != (n = Number(length)))) { + // parser error - ignoring payload + return callback(err, 0, 1); + } + + msg = data.substr(i + 1, n); + + if (length != msg.length) { + // parser error - ignoring payload + return callback(err, 0, 1); + } + + if (msg.length) { + packet = exports.decodePacket(msg, binaryType, false); + + if (err.type === packet.type && err.data === packet.data) { + // parser error in individual packet - ignoring payload + return callback(err, 0, 1); + } + + var ret = callback(packet, i + n, l); + if (false === ret) return; + } + + // advance cursor + i += n; + length = ''; + } + + if (length !== '') { + // parser error - ignoring payload + return callback(err, 0, 1); + } + + }; + + /** + * Encodes multiple messages (payload) as binary. + * + * <1 = binary, 0 = string>[...] + * + * Example: + * 1 3 255 1 2 3, if the binary contents are interpreted as 8 bit integers + * + * @param {Array} packets + * @return {ArrayBuffer} encoded payload + * @api private + */ + + exports.encodePayloadAsArrayBuffer = function(packets, callback) { + if (!packets.length) { + return callback(new ArrayBuffer(0)); + } + + function encodeOne(packet, doneCallback) { + exports.encodePacket(packet, true, true, function(data) { + return doneCallback(null, data); + }); + } + + map(packets, encodeOne, function(err, encodedPackets) { + var totalLength = encodedPackets.reduce(function(acc, p) { + var len; + if (typeof p === 'string'){ + len = p.length; + } else { + len = p.byteLength; + } + return acc + len.toString().length + len + 2; // string/binary identifier + separator = 2 + }, 0); + + var resultArray = new Uint8Array(totalLength); + + var bufferIndex = 0; + encodedPackets.forEach(function(p) { + var isString = typeof p === 'string'; + var ab = p; + if (isString) { + var view = new Uint8Array(p.length); + for (var i = 0; i < p.length; i++) { + view[i] = p.charCodeAt(i); + } + ab = view.buffer; + } + + if (isString) { // not true binary + resultArray[bufferIndex++] = 0; + } else { // true binary + resultArray[bufferIndex++] = 1; + } + + var lenStr = ab.byteLength.toString(); + for (var i = 0; i < lenStr.length; i++) { + resultArray[bufferIndex++] = parseInt(lenStr[i]); + } + resultArray[bufferIndex++] = 255; + + var view = new Uint8Array(ab); + for (var i = 0; i < view.length; i++) { + resultArray[bufferIndex++] = view[i]; + } + }); + + return callback(resultArray.buffer); + }); + }; + + /** + * Encode as Blob + */ + + exports.encodePayloadAsBlob = function(packets, callback) { + function encodeOne(packet, doneCallback) { + exports.encodePacket(packet, true, true, function(encoded) { + var binaryIdentifier = new Uint8Array(1); + binaryIdentifier[0] = 1; + if (typeof encoded === 'string') { + var view = new Uint8Array(encoded.length); + for (var i = 0; i < encoded.length; i++) { + view[i] = encoded.charCodeAt(i); + } + encoded = view.buffer; + binaryIdentifier[0] = 0; + } + + var len = (encoded instanceof ArrayBuffer) + ? encoded.byteLength + : encoded.size; + + var lenStr = len.toString(); + var lengthAry = new Uint8Array(lenStr.length + 1); + for (var i = 0; i < lenStr.length; i++) { + lengthAry[i] = parseInt(lenStr[i]); + } + lengthAry[lenStr.length] = 255; + + if (Blob) { + var blob = new Blob([binaryIdentifier.buffer, lengthAry.buffer, encoded]); + doneCallback(null, blob); + } + }); + } + + map(packets, encodeOne, function(err, results) { + return callback(new Blob(results)); + }); + }; + + /* + * Decodes data when a payload is maybe expected. Strings are decoded by + * interpreting each byte as a key code for entries marked to start with 0. See + * description of encodePayloadAsBinary + * + * @param {ArrayBuffer} data, callback method + * @api public + */ + + exports.decodePayloadAsBinary = function (data, binaryType, callback) { + if (typeof binaryType === 'function') { + callback = binaryType; + binaryType = null; + } + + var bufferTail = data; + var buffers = []; + + while (bufferTail.byteLength > 0) { + var tailArray = new Uint8Array(bufferTail); + var isString = tailArray[0] === 0; + var msgLength = ''; + + for (var i = 1; ; i++) { + if (tailArray[i] === 255) break; + + // 310 = char length of Number.MAX_VALUE + if (msgLength.length > 310) { + return callback(err, 0, 1); + } + + msgLength += tailArray[i]; + } + + bufferTail = sliceBuffer(bufferTail, 2 + msgLength.length); + msgLength = parseInt(msgLength); + + var msg = sliceBuffer(bufferTail, 0, msgLength); + if (isString) { + try { + msg = String.fromCharCode.apply(null, new Uint8Array(msg)); + } catch (e) { + // iPhone Safari doesn't let you apply to typed arrays + var typed = new Uint8Array(msg); + msg = ''; + for (var i = 0; i < typed.length; i++) { + msg += String.fromCharCode(typed[i]); + } + } + } + + buffers.push(msg); + bufferTail = sliceBuffer(bufferTail, msgLength); + } + + var total = buffers.length; + buffers.forEach(function(buffer, i) { + callback(exports.decodePacket(buffer, binaryType, true), i, total); + }); + }; + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 10 */ +/***/ function(module, exports) { + + + /** + * Gets the keys for an object. + * + * @return {Array} keys + * @api private + */ + + module.exports = Object.keys || function keys (obj){ + var arr = []; + var has = Object.prototype.hasOwnProperty; + + for (var i in obj) { + if (has.call(obj, i)) { + arr.push(i); + } + } + return arr; + }; + + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(global) {/* global Blob File */ + + /* + * Module requirements. + */ + + var isArray = __webpack_require__(12); + + var toString = Object.prototype.toString; + var withNativeBlob = typeof global.Blob === 'function' || toString.call(global.Blob) === '[object BlobConstructor]'; + var withNativeFile = typeof global.File === 'function' || toString.call(global.File) === '[object FileConstructor]'; + + /** + * Module exports. + */ + + module.exports = hasBinary; + + /** + * Checks for binary data. + * + * Supports Buffer, ArrayBuffer, Blob and File. + * + * @param {Object} anything + * @api public + */ + + function hasBinary (obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + + if (isArray(obj)) { + for (var i = 0, l = obj.length; i < l; i++) { + if (hasBinary(obj[i])) { + return true; + } + } + return false; + } + + if ((typeof global.Buffer === 'function' && global.Buffer.isBuffer && global.Buffer.isBuffer(obj)) || + (typeof global.ArrayBuffer === 'function' && obj instanceof ArrayBuffer) || + (withNativeBlob && obj instanceof Blob) || + (withNativeFile && obj instanceof File) + ) { + return true; + } + + // see: https://github.com/Automattic/has-binary/pull/4 + if (obj.toJSON && typeof obj.toJSON === 'function' && arguments.length === 1) { + return hasBinary(obj.toJSON(), true); + } + + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) { + return true; + } + } + + return false; + } + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + var toString = {}.toString; + + module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; + }; + + +/***/ }, +/* 13 */ +/***/ function(module, exports) { + + /** + * An abstraction for slicing an arraybuffer even when + * ArrayBuffer.prototype.slice is not supported + * + * @api public + */ + + module.exports = function(arraybuffer, start, end) { + var bytes = arraybuffer.byteLength; + start = start || 0; + end = end || bytes; + + if (arraybuffer.slice) { return arraybuffer.slice(start, end); } + + if (start < 0) { start += bytes; } + if (end < 0) { end += bytes; } + if (end > bytes) { end = bytes; } + + if (start >= bytes || start >= end || bytes === 0) { + return new ArrayBuffer(0); + } + + var abv = new Uint8Array(arraybuffer); + var result = new Uint8Array(end - start); + for (var i = start, ii = 0; i < end; i++, ii++) { + result[ii] = abv[i]; + } + return result.buffer; + }; + + +/***/ }, +/* 14 */ +/***/ function(module, exports) { + + module.exports = after + + function after(count, callback, err_cb) { + var bail = false + err_cb = err_cb || noop + proxy.count = count + + return (count === 0) ? callback() : proxy + + function proxy(err, result) { + if (proxy.count <= 0) { + throw new Error('after called too many times') + } + --proxy.count + + // after first error, rest are passed to err_cb + if (err) { + bail = true + callback(err) + // future error callbacks will go to error handler + callback = err_cb + } else if (proxy.count === 0 && !bail) { + callback(null, result) + } + } + } + + function noop() {} + + +/***/ }, +/* 15 */ +/***/ function(module, exports, __webpack_require__) { + + var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {/*! https://mths.be/utf8js v2.1.2 by @mathias */ + ;(function(root) { + + // Detect free variables `exports` + var freeExports = typeof exports == 'object' && exports; + + // Detect free variable `module` + var freeModule = typeof module == 'object' && module && + module.exports == freeExports && module; + + // Detect free variable `global`, from Node.js or Browserified code, + // and use it as `root` + var freeGlobal = typeof global == 'object' && global; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + var stringFromCharCode = String.fromCharCode; + + // Taken from https://mths.be/punycode + function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + var value; + var extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + // Taken from https://mths.be/punycode + function ucs2encode(array) { + var length = array.length; + var index = -1; + var value; + var output = ''; + while (++index < length) { + value = array[index]; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + } + return output; + } + + function checkScalarValue(codePoint, strict) { + if (codePoint >= 0xD800 && codePoint <= 0xDFFF) { + if (strict) { + throw Error( + 'Lone surrogate U+' + codePoint.toString(16).toUpperCase() + + ' is not a scalar value' + ); + } + return false; + } + return true; + } + /*--------------------------------------------------------------------------*/ + + function createByte(codePoint, shift) { + return stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80); + } + + function encodeCodePoint(codePoint, strict) { + if ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence + return stringFromCharCode(codePoint); + } + var symbol = ''; + if ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence + symbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0); + } + else if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence + if (!checkScalarValue(codePoint, strict)) { + codePoint = 0xFFFD; + } + symbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0); + symbol += createByte(codePoint, 6); + } + else if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence + symbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0); + symbol += createByte(codePoint, 12); + symbol += createByte(codePoint, 6); + } + symbol += stringFromCharCode((codePoint & 0x3F) | 0x80); + return symbol; + } + + function utf8encode(string, opts) { + opts = opts || {}; + var strict = false !== opts.strict; + + var codePoints = ucs2decode(string); + var length = codePoints.length; + var index = -1; + var codePoint; + var byteString = ''; + while (++index < length) { + codePoint = codePoints[index]; + byteString += encodeCodePoint(codePoint, strict); + } + return byteString; + } + + /*--------------------------------------------------------------------------*/ + + function readContinuationByte() { + if (byteIndex >= byteCount) { + throw Error('Invalid byte index'); + } + + var continuationByte = byteArray[byteIndex] & 0xFF; + byteIndex++; + + if ((continuationByte & 0xC0) == 0x80) { + return continuationByte & 0x3F; + } + + // If we end up here, it’s not a continuation byte + throw Error('Invalid continuation byte'); + } + + function decodeSymbol(strict) { + var byte1; + var byte2; + var byte3; + var byte4; + var codePoint; + + if (byteIndex > byteCount) { + throw Error('Invalid byte index'); + } + + if (byteIndex == byteCount) { + return false; + } + + // Read first byte + byte1 = byteArray[byteIndex] & 0xFF; + byteIndex++; + + // 1-byte sequence (no continuation bytes) + if ((byte1 & 0x80) == 0) { + return byte1; + } + + // 2-byte sequence + if ((byte1 & 0xE0) == 0xC0) { + byte2 = readContinuationByte(); + codePoint = ((byte1 & 0x1F) << 6) | byte2; + if (codePoint >= 0x80) { + return codePoint; + } else { + throw Error('Invalid continuation byte'); + } + } + + // 3-byte sequence (may include unpaired surrogates) + if ((byte1 & 0xF0) == 0xE0) { + byte2 = readContinuationByte(); + byte3 = readContinuationByte(); + codePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3; + if (codePoint >= 0x0800) { + return checkScalarValue(codePoint, strict) ? codePoint : 0xFFFD; + } else { + throw Error('Invalid continuation byte'); + } + } + + // 4-byte sequence + if ((byte1 & 0xF8) == 0xF0) { + byte2 = readContinuationByte(); + byte3 = readContinuationByte(); + byte4 = readContinuationByte(); + codePoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0C) | + (byte3 << 0x06) | byte4; + if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) { + return codePoint; + } + } + + throw Error('Invalid UTF-8 detected'); + } + + var byteArray; + var byteCount; + var byteIndex; + function utf8decode(byteString, opts) { + opts = opts || {}; + var strict = false !== opts.strict; + + byteArray = ucs2decode(byteString); + byteCount = byteArray.length; + byteIndex = 0; + var codePoints = []; + var tmp; + while ((tmp = decodeSymbol(strict)) !== false) { + codePoints.push(tmp); + } + return ucs2encode(codePoints); + } + + /*--------------------------------------------------------------------------*/ + + var utf8 = { + 'version': '2.1.2', + 'encode': utf8encode, + 'decode': utf8decode + }; + + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + true + ) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { + return utf8; + }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js or RingoJS v0.8.0+ + freeModule.exports = utf8; + } else { // in Narwhal or RingoJS v0.7.0- + var object = {}; + var hasOwnProperty = object.hasOwnProperty; + for (var key in utf8) { + hasOwnProperty.call(utf8, key) && (freeExports[key] = utf8[key]); + } + } + } else { // in Rhino or a web browser + root.utf8 = utf8; + } + + }(this)); + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)(module), (function() { return this; }()))) + +/***/ }, +/* 16 */ +/***/ function(module, exports) { + + module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + module.children = []; + module.webpackPolyfill = 1; + } + return module; + } + + +/***/ }, +/* 17 */ +/***/ function(module, exports) { + + /* + * base64-arraybuffer + * https://github.com/niklasvh/base64-arraybuffer + * + * Copyright (c) 2012 Niklas von Hertzen + * Licensed under the MIT license. + */ + (function(){ + "use strict"; + + var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + // Use a lookup table to find the index. + var lookup = new Uint8Array(256); + for (var i = 0; i < chars.length; i++) { + lookup[chars.charCodeAt(i)] = i; + } + + exports.encode = function(arraybuffer) { + var bytes = new Uint8Array(arraybuffer), + i, len = bytes.length, base64 = ""; + + for (i = 0; i < len; i+=3) { + base64 += chars[bytes[i] >> 2]; + base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)]; + base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)]; + base64 += chars[bytes[i + 2] & 63]; + } + + if ((len % 3) === 2) { + base64 = base64.substring(0, base64.length - 1) + "="; + } else if (len % 3 === 1) { + base64 = base64.substring(0, base64.length - 2) + "=="; + } + + return base64; + }; + + exports.decode = function(base64) { + var bufferLength = base64.length * 0.75, + len = base64.length, i, p = 0, + encoded1, encoded2, encoded3, encoded4; + + if (base64[base64.length - 1] === "=") { + bufferLength--; + if (base64[base64.length - 2] === "=") { + bufferLength--; + } + } + + var arraybuffer = new ArrayBuffer(bufferLength), + bytes = new Uint8Array(arraybuffer); + + for (i = 0; i < len; i+=4) { + encoded1 = lookup[base64.charCodeAt(i)]; + encoded2 = lookup[base64.charCodeAt(i+1)]; + encoded3 = lookup[base64.charCodeAt(i+2)]; + encoded4 = lookup[base64.charCodeAt(i+3)]; + + bytes[p++] = (encoded1 << 2) | (encoded2 >> 4); + bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2); + bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63); + } + + return arraybuffer; + }; + })(); + + +/***/ }, +/* 18 */ +/***/ function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {/** + * Create a blob builder even when vendor prefixes exist + */ + + var BlobBuilder = global.BlobBuilder + || global.WebKitBlobBuilder + || global.MSBlobBuilder + || global.MozBlobBuilder; + + /** + * Check if Blob constructor is supported + */ + + var blobSupported = (function() { + try { + var a = new Blob(['hi']); + return a.size === 2; + } catch(e) { + return false; + } + })(); + + /** + * Check if Blob constructor supports ArrayBufferViews + * Fails in Safari 6, so we need to map to ArrayBuffers there. + */ + + var blobSupportsArrayBufferView = blobSupported && (function() { + try { + var b = new Blob([new Uint8Array([1,2])]); + return b.size === 2; + } catch(e) { + return false; + } + })(); + + /** + * Check if BlobBuilder is supported + */ + + var blobBuilderSupported = BlobBuilder + && BlobBuilder.prototype.append + && BlobBuilder.prototype.getBlob; + + /** + * Helper function that maps ArrayBufferViews to ArrayBuffers + * Used by BlobBuilder constructor and old browsers that didn't + * support it in the Blob constructor. + */ + + function mapArrayBufferViews(ary) { + for (var i = 0; i < ary.length; i++) { + var chunk = ary[i]; + if (chunk.buffer instanceof ArrayBuffer) { + var buf = chunk.buffer; + + // if this is a subarray, make a copy so we only + // include the subarray region from the underlying buffer + if (chunk.byteLength !== buf.byteLength) { + var copy = new Uint8Array(chunk.byteLength); + copy.set(new Uint8Array(buf, chunk.byteOffset, chunk.byteLength)); + buf = copy.buffer; + } + + ary[i] = buf; + } + } + } + + function BlobBuilderConstructor(ary, options) { + options = options || {}; + + var bb = new BlobBuilder(); + mapArrayBufferViews(ary); + + for (var i = 0; i < ary.length; i++) { + bb.append(ary[i]); + } + + return (options.type) ? bb.getBlob(options.type) : bb.getBlob(); + }; + + function BlobConstructor(ary, options) { + mapArrayBufferViews(ary); + return new Blob(ary, options || {}); + }; + + module.exports = (function() { + if (blobSupported) { + return blobSupportsArrayBufferView ? global.Blob : BlobConstructor; + } else if (blobBuilderSupported) { + return BlobBuilderConstructor; + } else { + return undefined; + } + })(); + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { + + + /** + * Expose `Emitter`. + */ + + if (true) { + module.exports = Emitter; + } + + /** + * Initialize a new `Emitter`. + * + * @api public + */ + + function Emitter(obj) { + if (obj) return mixin(obj); + }; + + /** + * Mixin the emitter properties. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + + function mixin(obj) { + for (var key in Emitter.prototype) { + obj[key] = Emitter.prototype[key]; + } + return obj; + } + + /** + * Listen on the given `event` with `fn`. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + + Emitter.prototype.on = + Emitter.prototype.addEventListener = function(event, fn){ + this._callbacks = this._callbacks || {}; + (this._callbacks['$' + event] = this._callbacks['$' + event] || []) + .push(fn); + return this; + }; + + /** + * Adds an `event` listener that will be invoked a single + * time then automatically removed. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + + Emitter.prototype.once = function(event, fn){ + function on() { + this.off(event, on); + fn.apply(this, arguments); + } + + on.fn = fn; + this.on(event, on); + return this; + }; + + /** + * Remove the given callback for `event` or all + * registered callbacks. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + + Emitter.prototype.off = + Emitter.prototype.removeListener = + Emitter.prototype.removeAllListeners = + Emitter.prototype.removeEventListener = function(event, fn){ + this._callbacks = this._callbacks || {}; + + // all + if (0 == arguments.length) { + this._callbacks = {}; + return this; + } + + // specific event + var callbacks = this._callbacks['$' + event]; + if (!callbacks) return this; + + // remove all handlers + if (1 == arguments.length) { + delete this._callbacks['$' + event]; + return this; + } + + // remove specific handler + var cb; + for (var i = 0; i < callbacks.length; i++) { + cb = callbacks[i]; + if (cb === fn || cb.fn === fn) { + callbacks.splice(i, 1); + break; + } + } + return this; + }; + + /** + * Emit `event` with the given args. + * + * @param {String} event + * @param {Mixed} ... + * @return {Emitter} + */ + + Emitter.prototype.emit = function(event){ + this._callbacks = this._callbacks || {}; + var args = [].slice.call(arguments, 1) + , callbacks = this._callbacks['$' + event]; + + if (callbacks) { + callbacks = callbacks.slice(0); + for (var i = 0, len = callbacks.length; i < len; ++i) { + callbacks[i].apply(this, args); + } + } + + return this; + }; + + /** + * Return array of callbacks for `event`. + * + * @param {String} event + * @return {Array} + * @api public + */ + + Emitter.prototype.listeners = function(event){ + this._callbacks = this._callbacks || {}; + return this._callbacks['$' + event] || []; + }; + + /** + * Check if this emitter has `event` handlers. + * + * @param {String} event + * @return {Boolean} + * @api public + */ + + Emitter.prototype.hasListeners = function(event){ + return !! this.listeners(event).length; + }; + + +/***/ }, +/* 20 */ +/***/ function(module, exports) { + + /** + * Compiles a querystring + * Returns string representation of the object + * + * @param {Object} + * @api private + */ + + exports.encode = function (obj) { + var str = ''; + + for (var i in obj) { + if (obj.hasOwnProperty(i)) { + if (str.length) str += '&'; + str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]); + } + } + + return str; + }; + + /** + * Parses a simple querystring into an object + * + * @param {String} qs + * @api private + */ + + exports.decode = function(qs){ + var qry = {}; + var pairs = qs.split('&'); + for (var i = 0, l = pairs.length; i < l; i++) { + var pair = pairs[i].split('='); + qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]); + } + return qry; + }; + + +/***/ }, +/* 21 */ +/***/ function(module, exports) { + + + module.exports = function(a, b){ + var fn = function(){}; + fn.prototype = b.prototype; + a.prototype = new fn; + a.prototype.constructor = a; + }; + +/***/ }, +/* 22 */ +/***/ function(module, exports) { + + 'use strict'; + + var alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split('') + , length = 64 + , map = {} + , seed = 0 + , i = 0 + , prev; + + /** + * Return a string representing the specified number. + * + * @param {Number} num The number to convert. + * @returns {String} The string representation of the number. + * @api public + */ + function encode(num) { + var encoded = ''; + + do { + encoded = alphabet[num % length] + encoded; + num = Math.floor(num / length); + } while (num > 0); + + return encoded; + } + + /** + * Return the integer value specified by the given string. + * + * @param {String} str The string to convert. + * @returns {Number} The integer value represented by the string. + * @api public + */ + function decode(str) { + var decoded = 0; + + for (i = 0; i < str.length; i++) { + decoded = decoded * length + map[str.charAt(i)]; + } + + return decoded; + } + + /** + * Yeast: A tiny growing id generator. + * + * @returns {String} A unique id. + * @api public + */ + function yeast() { + var now = encode(+new Date()); + + if (now !== prev) return seed = 0, prev = now; + return now +'.'+ encode(seed++); + } + + // + // Map each character to its index. + // + for (; i < length; i++) map[alphabet[i]] = i; + + // + // Expose the `yeast`, `encode` and `decode` functions. + // + yeast.encode = encode; + yeast.decode = decode; + module.exports = yeast; + + +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + + exports = module.exports = __webpack_require__(25); + exports.log = log; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + + /** + * Colors. + */ + + exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' + ]; + + /** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + + function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); + } + + /** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + + exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } + }; + + + /** + * Colorize log arguments if enabled. + * + * @api public + */ + + function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit') + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); + } + + /** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + + function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); + } + + /** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + + function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} + } + + /** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + + function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; + } + + /** + * Enable namespaces listed in `localStorage.debug` initially. + */ + + exports.enable(load()); + + /** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + + function localstorage() { + try { + return window.localStorage; + } catch (e) {} + } + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24))) + +/***/ }, +/* 24 */ +/***/ function(module, exports) { + + // shim for using process in browser + var process = module.exports = {}; + + // cached from whatever global is present so that test runners that stub it + // don't break things. But we need to wrap it in a try catch in case it is + // wrapped in strict mode code which doesn't define any globals. It's inside a + // function because try/catches deoptimize in certain engines. + + var cachedSetTimeout; + var cachedClearTimeout; + + function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); + } + function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); + } + (function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } + } ()) + function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + + } + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + + } + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; + + function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } + } + + function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); + } + + process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } + }; + + // v8 likes predictible objects + function Item(fun, array) { + this.fun = fun; + this.array = array; + } + Item.prototype.run = function () { + this.fun.apply(null, this.array); + }; + process.title = 'browser'; + process.browser = true; + process.env = {}; + process.argv = []; + process.version = ''; // empty string to avoid regexp issues + process.versions = {}; + + function noop() {} + + process.on = noop; + process.addListener = noop; + process.once = noop; + process.off = noop; + process.removeListener = noop; + process.removeAllListeners = noop; + process.emit = noop; + process.prependListener = noop; + process.prependOnceListener = noop; + + process.listeners = function (name) { return [] } + + process.binding = function (name) { + throw new Error('process.binding is not supported'); + }; + + process.cwd = function () { return '/' }; + process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); + }; + process.umask = function() { return 0; }; + + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + + /** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + + exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; + exports.coerce = coerce; + exports.disable = disable; + exports.enable = enable; + exports.enabled = enabled; + exports.humanize = __webpack_require__(26); + + /** + * The currently active debug mode names, and names to skip. + */ + + exports.names = []; + exports.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + + exports.formatters = {}; + + /** + * Previous log timestamp. + */ + + var prevTime; + + /** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + + function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; + } + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + + function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + + function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @api public + */ + + function disable() { + exports.enable(''); + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + + function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + + function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; + } + + +/***/ }, +/* 26 */ +/***/ function(module, exports) { + + /** + * Helpers. + */ + + var s = 1000; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var y = d * 365.25; + + /** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + + module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); + }; + + /** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } + } + + /** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; + } + + /** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtLong(ms) { + return plural(ms, d, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; + } + + /** + * Pluralization helper. + */ + + function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; + } + + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(global) {'use strict'; + + /** + * Module requirements. + */ + + var Polling = __webpack_require__(7); + var inherit = __webpack_require__(21); + + /** + * Module exports. + */ + + module.exports = JSONPPolling; + + /** + * Cached regular expressions. + */ + + var rNewline = /\n/g; + var rEscapedNewline = /\\n/g; + + /** + * Global JSONP callbacks. + */ + + var callbacks; + + /** + * Noop. + */ + + function empty() {} + + /** + * JSONP Polling constructor. + * + * @param {Object} opts. + * @api public + */ + + function JSONPPolling(opts) { + Polling.call(this, opts); + + this.query = this.query || {}; + + // define global callbacks array if not present + // we do this here (lazily) to avoid unneeded global pollution + if (!callbacks) { + // we need to consider multiple engines in the same page + if (!global.___eio) global.___eio = []; + callbacks = global.___eio; + } + + // callback identifier + this.index = callbacks.length; + + // add callback to jsonp global + var self = this; + callbacks.push(function (msg) { + self.onData(msg); + }); + + // append to query string + this.query.j = this.index; + + // prevent spurious errors from being emitted when the window is unloaded + if (global.document && global.addEventListener) { + global.addEventListener('beforeunload', function () { + if (self.script) self.script.onerror = empty; + }, false); + } + } + + /** + * Inherits from Polling. + */ + + inherit(JSONPPolling, Polling); + + /* + * JSONP only supports binary as base64 encoded strings + */ + + JSONPPolling.prototype.supportsBinary = false; + + /** + * Closes the socket. + * + * @api private + */ + + JSONPPolling.prototype.doClose = function () { + if (this.script) { + this.script.parentNode.removeChild(this.script); + this.script = null; + } + + if (this.form) { + this.form.parentNode.removeChild(this.form); + this.form = null; + this.iframe = null; + } + + Polling.prototype.doClose.call(this); + }; + + /** + * Starts a poll cycle. + * + * @api private + */ + + JSONPPolling.prototype.doPoll = function () { + var self = this; + var script = document.createElement('script'); + + if (this.script) { + this.script.parentNode.removeChild(this.script); + this.script = null; + } + + script.async = true; + script.src = this.uri(); + script.onerror = function (e) { + self.onError('jsonp poll error', e); + }; + + var insertAt = document.getElementsByTagName('script')[0]; + if (insertAt) { + insertAt.parentNode.insertBefore(script, insertAt); + } else { + (document.head || document.body).appendChild(script); + } + this.script = script; + + var isUAgecko = 'undefined' !== typeof navigator && /gecko/i.test(navigator.userAgent); + + if (isUAgecko) { + setTimeout(function () { + var iframe = document.createElement('iframe'); + document.body.appendChild(iframe); + document.body.removeChild(iframe); + }, 100); + } + }; + + /** + * Writes with a hidden iframe. + * + * @param {String} data to send + * @param {Function} called upon flush. + * @api private + */ + + JSONPPolling.prototype.doWrite = function (data, fn) { + var self = this; + + if (!this.form) { + var form = document.createElement('form'); + var area = document.createElement('textarea'); + var id = this.iframeId = 'eio_iframe_' + this.index; + var iframe; + + form.className = 'socketio'; + form.style.position = 'absolute'; + form.style.top = '-1000px'; + form.style.left = '-1000px'; + form.target = id; + form.method = 'POST'; + form.setAttribute('accept-charset', 'utf-8'); + area.name = 'd'; + form.appendChild(area); + document.body.appendChild(form); + + this.form = form; + this.area = area; + } + + this.form.action = this.uri(); + + function complete() { + initIframe(); + fn(); + } + + function initIframe() { + if (self.iframe) { + try { + self.form.removeChild(self.iframe); + } catch (e) { + self.onError('jsonp polling iframe removal error', e); + } + } + + try { + // ie6 dynamic iframes with target="" support (thanks Chris Lambacher) + var html = '