Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

init

  • Loading branch information...
commit 71d09ebc816a70bac39d31d1346bb9102f8f6d3b 1 parent cc41398
@vogievetsky vogievetsky authored
Showing with 42,160 additions and 0 deletions.
  1. +2 −0  .gitignore
  2. +79 −0 app.coffee
  3. +1 −0  node_modules/paperboy/.npmignore
  4. +19 −0 node_modules/paperboy/LICENSE.txt
  5. +103 −0 node_modules/paperboy/README.md
  6. +38 −0 node_modules/paperboy/example/basic.js
  7. BIN  node_modules/paperboy/example/webroot/img/paperboy.jpg
  8. +11 −0 node_modules/paperboy/example/webroot/index.html
  9. +1 −0  node_modules/paperboy/index.js
  10. +315 −0 node_modules/paperboy/lib/paperboy.js
  11. +36 −0 node_modules/paperboy/package.json
  12. +6 −0 node_modules/paperboy/seed.yml
  13. +3 −0  node_modules/socket.io/.npmignore
  14. +6 −0 node_modules/socket.io/.travis.yml
  15. +284 −0 node_modules/socket.io/History.md
  16. +22 −0 node_modules/socket.io/LICENSE
  17. +31 −0 node_modules/socket.io/Makefile
  18. +345 −0 node_modules/socket.io/Readme.md
  19. +64 −0 node_modules/socket.io/benchmarks/decode.bench.js
  20. +90 −0 node_modules/socket.io/benchmarks/encode.bench.js
  21. +55 −0 node_modules/socket.io/benchmarks/runner.js
  22. +8 −0 node_modules/socket.io/index.js
  23. +167 −0 node_modules/socket.io/lib/client.js
  24. +97 −0 node_modules/socket.io/lib/logger.js
  25. +1,025 −0 node_modules/socket.io/lib/manager.js
  26. +355 −0 node_modules/socket.io/lib/namespace.js
  27. +249 −0 node_modules/socket.io/lib/parser.js
  28. +143 −0 node_modules/socket.io/lib/socket.io.js
  29. +369 −0 node_modules/socket.io/lib/socket.js
  30. +395 −0 node_modules/socket.io/lib/static.js
  31. +98 −0 node_modules/socket.io/lib/store.js
  32. +143 −0 node_modules/socket.io/lib/stores/memory.js
  33. +269 −0 node_modules/socket.io/lib/stores/redis.js
  34. +534 −0 node_modules/socket.io/lib/transport.js
  35. +106 −0 node_modules/socket.io/lib/transports/flashsocket.js
  36. +82 −0 node_modules/socket.io/lib/transports/htmlfile.js
  37. +147 −0 node_modules/socket.io/lib/transports/http-polling.js
  38. +119 −0 node_modules/socket.io/lib/transports/http.js
  39. +12 −0 node_modules/socket.io/lib/transports/index.js
  40. +97 −0 node_modules/socket.io/lib/transports/jsonp-polling.js
  41. +36 −0 node_modules/socket.io/lib/transports/websocket.js
  42. +362 −0 node_modules/socket.io/lib/transports/websocket/default.js
  43. +622 −0 node_modules/socket.io/lib/transports/websocket/hybi-07-12.js
  44. +622 −0 node_modules/socket.io/lib/transports/websocket/hybi-16.js
  45. +11 −0 node_modules/socket.io/lib/transports/websocket/index.js
  46. +69 −0 node_modules/socket.io/lib/transports/xhr-polling.js
  47. +50 −0 node_modules/socket.io/lib/util.js
  48. +1 −0  node_modules/socket.io/node_modules/policyfile/.npmignore
  49. +19 −0 node_modules/socket.io/node_modules/policyfile/LICENSE
  50. +7 −0 node_modules/socket.io/node_modules/policyfile/Makefile
  51. +98 −0 node_modules/socket.io/node_modules/policyfile/README.md
  52. +375 −0 node_modules/socket.io/node_modules/policyfile/doc/index.html
  53. +8 −0 node_modules/socket.io/node_modules/policyfile/examples/basic.fallback.js
  54. +5 −0 node_modules/socket.io/node_modules/policyfile/examples/basic.js
  55. +1 −0  node_modules/socket.io/node_modules/policyfile/index.js
  56. +289 −0 node_modules/socket.io/node_modules/policyfile/lib/server.js
  57. +56 −0 node_modules/socket.io/node_modules/policyfile/package.json
  58. +21 −0 node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.crt
  59. +27 −0 node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.private.key
  60. +231 −0 node_modules/socket.io/node_modules/policyfile/tests/unit.test.js
  61. +1 −0  node_modules/socket.io/node_modules/redis/.npmignore
  62. +638 −0 node_modules/socket.io/node_modules/redis/README.md
  63. +219 −0 node_modules/socket.io/node_modules/redis/changelog.md
  64. +5 −0 node_modules/socket.io/node_modules/redis/examples/auth.js
  65. +33 −0 node_modules/socket.io/node_modules/redis/examples/backpressure_drain.js
  66. +9 −0 node_modules/socket.io/node_modules/redis/examples/eval.js
  67. +24 −0 node_modules/socket.io/node_modules/redis/examples/extend.js
  68. +32 −0 node_modules/socket.io/node_modules/redis/examples/file.js
  69. +5 −0 node_modules/socket.io/node_modules/redis/examples/mget.js
  70. +10 −0 node_modules/socket.io/node_modules/redis/examples/monitor.js
  71. +46 −0 node_modules/socket.io/node_modules/redis/examples/multi.js
  72. +29 −0 node_modules/socket.io/node_modules/redis/examples/multi2.js
  73. +33 −0 node_modules/socket.io/node_modules/redis/examples/psubscribe.js
  74. +41 −0 node_modules/socket.io/node_modules/redis/examples/pub_sub.js
  75. +24 −0 node_modules/socket.io/node_modules/redis/examples/simple.js
  76. +17 −0 node_modules/socket.io/node_modules/redis/examples/sort.js
  77. +15 −0 node_modules/socket.io/node_modules/redis/examples/subqueries.js
  78. +19 −0 node_modules/socket.io/node_modules/redis/examples/subquery.js
  79. +29 −0 node_modules/socket.io/node_modules/redis/examples/unix_socket.js
  80. +31 −0 node_modules/socket.io/node_modules/redis/examples/web_server.js
  81. +39 −0 node_modules/socket.io/node_modules/redis/generate_commands.js
  82. +1,030 −0 node_modules/socket.io/node_modules/redis/index.js
  83. +126 −0 node_modules/socket.io/node_modules/redis/lib/commands.js
  84. +46 −0 node_modules/socket.io/node_modules/redis/lib/parser/hiredis.js
  85. +317 −0 node_modules/socket.io/node_modules/redis/lib/parser/javascript.js
  86. +61 −0 node_modules/socket.io/node_modules/redis/lib/queue.js
  87. +12 −0 node_modules/socket.io/node_modules/redis/lib/to_array.js
  88. +11 −0 node_modules/socket.io/node_modules/redis/lib/util.js
  89. +225 −0 node_modules/socket.io/node_modules/redis/multi_bench.js
  90. +9 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/.lock-wscript
  91. +16 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/Makefile
  92. 0  node_modules/socket.io/node_modules/redis/node_modules/hiredis/README
  93. +121 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/bench.js
  94. BIN  node_modules/socket.io/node_modules/redis/node_modules/hiredis/build/.wafpickle-7
  95. +2 −0  node_modules/socket.io/node_modules/redis/node_modules/hiredis/build/c4che/build.config.py
  96. +50 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/build/c4che/default.cache.py
  97. +44 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/build/config.log
  98. BIN  node_modules/socket.io/node_modules/redis/node_modules/hiredis/build/default/hiredis.node
  99. BIN  node_modules/socket.io/node_modules/redis/node_modules/hiredis/build/default/hiredis_1.o
  100. BIN  node_modules/socket.io/node_modules/redis/node_modules/hiredis/build/default/reader_1.o
  101. +16 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/CHANGELOG.md
  102. +29 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/COPYING
  103. +148 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/Makefile
  104. +352 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/README.md
  105. +97 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/adapters/ae.h
  106. +117 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/adapters/libev.h
  107. +78 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/adapters/libevent.h
  108. +604 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/async.c
  109. +125 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/async.h
  110. BIN  node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/async.o
  111. +338 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/dict.c
  112. +126 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/dict.h
  113. +56 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/example-ae.c
  114. +51 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/example-libev.c
  115. +52 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/example-libevent.c
  116. +68 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/example.c
  117. +16 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/fmacros.h
  118. +1,284 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/hiredis.c
  119. +204 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/hiredis.h
  120. BIN  node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/hiredis.o
  121. BIN  node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/libhiredis.a
  122. +279 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/net.c
  123. +47 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/net.h
  124. BIN  node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/net.o
  125. +605 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/sds.c
  126. +88 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/sds.h
  127. BIN  node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/sds.o
  128. +654 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis/test.c
  129. +14 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/hiredis.cc
  130. +39 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/hiredis.js
  131. +34 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/package.json
  132. +37 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/parser_bench.js
  133. +238 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/reader.cc
  134. +55 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/reader.h
  135. +172 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/test/reader.js
  136. +15 −0 node_modules/socket.io/node_modules/redis/node_modules/hiredis/wscript
  137. +46 −0 node_modules/socket.io/node_modules/redis/package.json
  138. +1,416 −0 node_modules/socket.io/node_modules/redis/test.js
  139. +89 −0 node_modules/socket.io/node_modules/redis/tests/buffer_bench.js
  140. +38 −0 node_modules/socket.io/node_modules/redis/tests/hiredis_parser.js
  141. +14 −0 node_modules/socket.io/node_modules/redis/tests/re_sub_test.js
  142. +29 −0 node_modules/socket.io/node_modules/redis/tests/reconnect_test.js
  143. +16 −0 node_modules/socket.io/node_modules/redis/tests/stress/codec.js
  144. +38 −0 node_modules/socket.io/node_modules/redis/tests/stress/pubsub/pub.js
  145. +10 −0 node_modules/socket.io/node_modules/redis/tests/stress/pubsub/run
  146. +23 −0 node_modules/socket.io/node_modules/redis/tests/stress/pubsub/server.js
  147. +49 −0 node_modules/socket.io/node_modules/redis/tests/stress/rpushblpop/pub.js
  148. +6 −0 node_modules/socket.io/node_modules/redis/tests/stress/rpushblpop/run
  149. +30 −0 node_modules/socket.io/node_modules/redis/tests/stress/rpushblpop/server.js
  150. +13 −0 node_modules/socket.io/node_modules/redis/tests/stress/speed/00
  151. +13 −0 node_modules/socket.io/node_modules/redis/tests/stress/speed/plot
  152. BIN  node_modules/socket.io/node_modules/redis/tests/stress/speed/size-rate.png
  153. +84 −0 node_modules/socket.io/node_modules/redis/tests/stress/speed/speed.js
  154. +18 −0 node_modules/socket.io/node_modules/redis/tests/sub_quit_test.js
  155. +2 −0  node_modules/socket.io/node_modules/socket.io-client/.npmignore
  156. +210 −0 node_modules/socket.io/node_modules/socket.io-client/History.md
  157. +20 −0 node_modules/socket.io/node_modules/socket.io-client/Makefile
  158. +246 −0 node_modules/socket.io/node_modules/socket.io-client/README.md
  159. +297 −0 node_modules/socket.io/node_modules/socket.io-client/bin/builder.js
  160. BIN  node_modules/socket.io/node_modules/socket.io-client/dist/WebSocketMain.swf
  161. BIN  node_modules/socket.io/node_modules/socket.io-client/dist/WebSocketMainInsecure.swf
  162. +3,862 −0 node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js
  163. +2 −0  node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.min.js
  164. +184 −0 node_modules/socket.io/node_modules/socket.io-client/lib/events.js
  165. +206 −0 node_modules/socket.io/node_modules/socket.io-client/lib/io.js
  166. +322 −0 node_modules/socket.io/node_modules/socket.io-client/lib/json.js
  167. +242 −0 node_modules/socket.io/node_modules/socket.io-client/lib/namespace.js
  168. +262 −0 node_modules/socket.io/node_modules/socket.io-client/lib/parser.js
  169. +577 −0 node_modules/socket.io/node_modules/socket.io-client/lib/socket.js
  170. +256 −0 node_modules/socket.io/node_modules/socket.io-client/lib/transport.js
  171. +191 −0 node_modules/socket.io/node_modules/socket.io-client/lib/transports/flashsocket.js
  172. +171 −0 node_modules/socket.io/node_modules/socket.io-client/lib/transports/htmlfile.js
  173. +256 −0 node_modules/socket.io/node_modules/socket.io-client/lib/transports/jsonp-polling.js
  174. +197 −0 node_modules/socket.io/node_modules/socket.io-client/lib/transports/websocket.js
  175. +171 −0 node_modules/socket.io/node_modules/socket.io-client/lib/transports/xhr-polling.js
  176. +217 −0 node_modules/socket.io/node_modules/socket.io-client/lib/transports/xhr.js
  177. +365 −0 node_modules/socket.io/node_modules/socket.io-client/lib/util.js
  178. +1 −0  node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/.npmignore
  179. +157 −0 node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/README.md
  180. BIN  node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/WebSocketMain.swf
  181. BIN  node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/WebSocketMainInsecure.zip
  182. +8 −0 node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/IWebSocketLogger.as
  183. +464 −0 node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/WebSocket.as
  184. +33 −0 node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/WebSocketEvent.as
  185. +150 −0 node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/WebSocketMain.as
  186. +19 −0 ...modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/WebSocketMainInsecure.as
  187. +10 −0 node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/build.sh
  188. +204 −0 ....io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/adobe/net/proxies/RFC2817Socket.as
  189. +375 −0 ...ules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/gsolo/encryption/MD5.as
  190. +287 −0 ...les/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/Crypto.as
  191. +3,235 −0 ...ules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/cert/MozillaRootCertificates.as
  192. +218 −0 ...node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/cert/X509Certificate.as
  193. +57 −0 ...es/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/cert/X509CertificateCollection.as
  194. +82 −0 .../socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/HMAC.as
  195. +27 −0 ...socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/IHMAC.as
  196. +21 −0 ...socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/IHash.as
  197. +137 −0 ...s/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/MAC.as
  198. +124 −0 ...s/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/MD2.as
  199. +204 −0 ...s/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/MD5.as
  200. +106 −0 .../socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/SHA1.as
  201. +28 −0 ...ocket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/SHA224.as
  202. +115 −0 ...ocket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/SHA256.as
  203. +71 −0 ...cket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/SHABase.as
  204. +90 −0 .../socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/prng/ARC4.as
  205. +20 −0 ...socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/prng/IPRNG.as
  206. +119 −0 ...ocket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/prng/Random.as
  207. +142 −0 ...ocket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/prng/TLSPRF.as
  208. +339 −0 ...socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/rsa/RSAKey.as
  209. +2,797 −0 ....io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/AESKey.as
  210. +375 −0 ...ode_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/BlowFishKey.as
  211. +55 −0 ...io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/CBCMode.as
  212. +61 −0 ...o/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/CFB8Mode.as
  213. +64 −0 ...io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/CFBMode.as
  214. +58 −0 ...io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/CTRMode.as
  215. +365 −0 ....io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/DESKey.as
  216. +86 −0 ...io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/ECBMode.as
  217. +21 −0 ...io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/ICipher.as
  218. +15 −0 ...t.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/IMode.as
  219. +32 −0 ...et.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/IPad.as
  220. +21 −0 ...e_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/IStreamCipher.as
  221. +35 −0 ...e_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/ISymmetricKey.as
  222. +110 −0 ....io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/IVMode.as
  223. +34 −0 ...io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/NullPad.as
  224. +52 −0 ...io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/OFBMode.as
  225. +44 −0 ...t.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/PKCS5.as
  226. +44 −0 ....io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/SSLPad.as
  227. +60 −0 ...de_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/SimpleIVMode.as
  228. +42 −0 ....io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/TLSPad.as
  229. +88 −0 ...de_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/TripleDESKey.as
  230. +94 −0 ...io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/XTeaKey.as
  231. +29 −0 ....io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/aeskey.pl
  232. +2,304 −0 ...t.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/dump.txt
Sorry, we could not display the entire diff because too many files (552) changed.
View
2  .gitignore
@@ -0,0 +1,2 @@
+notes
+store/
View
79 app.coffee
@@ -0,0 +1,79 @@
+http = require('http')
+paperboy = require('paperboy')
+io = require('socket.io')
+fs = require('fs')
+
+LOCATION_DIR = 'store/'
+
+locationNames = ['dc']
+locations = {}
+
+# loader
+for locationName in locationNames
+ file = LOCATION_DIR + locationName + '.json'
+ json = fs.readFileSync file
+ try
+ json = JSON.parse(json)
+ catch e
+ json = {
+ dirty: false
+ lastChanged: new Date()
+ drawers: {}
+ }
+
+ locations[locationName] = json
+
+# saver
+setInterval((->
+ for locationName in locationNames
+ do (locationName) ->
+ locationSpec = locations[locationName]
+ return unless locationSpec.dirty
+ file = LOCATION_DIR + locationName + '.json'
+ data = JSON.stringify(locationSpec, null, 2)
+ fs.writeFile file, data, (err) ->
+ if err
+ console.error("There was an error writing the file [#{file}]", err)
+ else
+ console.log('Location file saved')
+ locationSpec.dirty = false
+ return
+ return
+ return
+), 2000)
+
+app = http.createServer (req, res) ->
+ paperboy
+ .deliver(__dirname + '/public', req, res)
+ .addHeader('X-PaperRoute', 'Node')
+ .before(->
+ console.log('Received Request')
+ )
+ return
+
+io = io.listen(app)
+app.listen(8181)
+
+io.sockets.on 'connection', (socket) ->
+ client = {}
+
+ # when the client emits 'adduser', this listens and executes
+ socket.on 'addClient', (locationStr) ->
+ client.location = locationStr
+ location = locations[client.location]
+
+ # send client to location
+ socket.join(client.location)
+
+ # echo to client they've connected
+ socket.emit('updateDrawers', location.drawers)
+ return
+
+ socket.on 'drawerChange', (drawer, state) ->
+ location = locations[client.location]
+ location.drawers[drawer] = state
+ socket.broadcast.to(client.location).emit('drawerChange', drawer, state)
+ location.dirty = true
+ return
+
+ return
View
1  node_modules/paperboy/.npmignore
@@ -0,0 +1 @@
+*.swp
View
19 node_modules/paperboy/LICENSE.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2010 Debuggable Limited <felix@debuggable.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.
View
103 node_modules/paperboy/README.md
@@ -0,0 +1,103 @@
+# Paperboy
+
+## Purpose
+
+A node.js module for delivering static files.
+
+## Current Status
+
+This module is used by [tempalias.com](http://tempalias.com/) in production
+and is mainted by [Felix Geisendörfer](https://github.com/felixge). However,
+this one one of my first node modules and it lacks a test suite, you've been
+warned : ).
+
+## Features
+
+ * Configurable callbacks on most events
+ * ETag / 304 Support
+ * Custom HTTP headers
+
+## Example
+
+Example from example/basic.js:
+
+ var
+ path = require('path'),
+ http = require('http'),
+ paperboy = require('../lib/paperboy'),
+
+ PORT = 8003,
+ WEBROOT = path.join(path.dirname(__filename), 'webroot');
+
+ http.createServer(function(req, res) {
+ var ip = req.connection.remoteAddress;
+ paperboy
+ .deliver(WEBROOT, req, res)
+ .addHeader('Expires', 300)
+ .addHeader('X-PaperRoute', 'Node')
+ .before(function() {
+ console.log('Received Request');
+ })
+ .after(function(statCode) {
+ log(statCode, req.url, ip);
+ })
+ .error(function(statCode, msg) {
+ res.writeHead(statCode, {'Content-Type': 'text/plain'});
+ res.end("Error " + statCode);
+ log(statCode, req.url, ip, msg);
+ })
+ .otherwise(function(err) {
+ res.writeHead(404, {'Content-Type': 'text/plain'});
+ res.end("Error 404: File not found");
+ log(404, req.url, ip, err);
+ });
+ }).listen(PORT);
+
+ function log(statCode, url, ip, err) {
+ var logStr = statCode + ' - ' + url + ' - ' + ip;
+ if (err)
+ logStr += ' - ' + err;
+ console.log(logStr);
+ }
+
+## API Docs
+
+### paperboy.deliver(webroot, req, res)
+
+Checks the `webroot` folder if it has a file that matches the `req.url` and streams it to the client. If `req.url` ends with a '/' (slash), 'index.html' is appended automatically.
+
+Parameters:
+
+* `webroot`: Absolute path where too look for static files to serve
+* `req`: A `http.ServerRequest` object
+* `res`: A `http.ServerResponse` object
+
+This returns an object with several functions that you can call, to modify how the static content is delivered. Each of these functions returns the object, so you can chain them, as shown in the example above. They each take a callback function, whose arguments and expected behavior are detailed below.
+
+#### before(callback())
+
+Fires if a matching file was found in the `webroot` and is about to be delivered. The delivery can be canceled by returning `false` from within the callback.
+
+#### after(callback(statCode))
+
+Fires after a file has been successfully delivered from the `webroot`. `statCode` contains the numeric HTTP status code that was sent to the client. You must close the connection yourself if the error callback fires!
+
+#### error(callback(statCode, msg))
+
+Fires if there was an error delivering a file from the `webroot`. `statCode` contains the numeric HTTP status code that was sent to the client. `msg` contains the error message. You must close the connection yourself if the error callback fires! The default callback shows a minimal HTTP error page.
+
+#### otherwise(callback(err))
+
+Fires if no matching file was found in the `webroot`. Also fires if `false` was returned in the `delegate.before()` callback. If there was a problem stating the file, `err` is set to the contents of that error message. The default callback shows a simple "HTTP 404 File Not Found" page.
+
+#### addHeader(callback(name, value))
+
+Sets an arbitrary HTTP header. The header name `Expires` is special and expects the number of milliseconds till expiry, from which it will calculate the proper HTTP date.
+
+## License
+
+Paperboy is licensed under the MIT license.
+
+## Credits
+
+* [Jan Lehnardt](http://twitter.com/janl) for coming up with the name "Paperboy"
View
38 node_modules/paperboy/example/basic.js
@@ -0,0 +1,38 @@
+var
+ path = require('path'),
+ http = require('http'),
+ paperboy = require('../lib/paperboy'),
+
+ PORT = 8003,
+ WEBROOT = path.join(path.dirname(__filename), 'webroot');
+
+http.createServer(function(req, res) {
+ var ip = req.connection.remoteAddress;
+ paperboy
+ .deliver(WEBROOT, req, res)
+ .addHeader('Expires', 300)
+ .addHeader('X-PaperRoute', 'Node')
+ .before(function() {
+ console.log('Received Request');
+ })
+ .after(function(statCode) {
+ log(statCode, req.url, ip);
+ })
+ // .error(function(statCode, msg) {
+ // res.writeHead(statCode, {'Content-Type': 'text/plain'});
+ // res.end("Error " + statCode);
+ // log(statCode, req.url, ip, msg);
+ // })
+ // .otherwise(function(err) {
+ // res.writeHead(404, {'Content-Type': 'text/plain'});
+ // res.end("Error 404: File not found");
+ // log(404, req.url, ip, err);
+ // });
+}).listen(PORT);
+
+function log(statCode, url, ip, err) {
+ var logStr = statCode + ' - ' + url + ' - ' + ip;
+ if (err)
+ logStr += ' - ' + err;
+ console.log(logStr);
+}
View
BIN  node_modules/paperboy/example/webroot/img/paperboy.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
11 node_modules/paperboy/example/webroot/index.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Paperboy Example</title>
+</head>
+<body>
+ <h1>It works!</h1>
+ <img src="/img/paperboy.jpg">
+</body>
+</html>
View
1  node_modules/paperboy/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib/paperboy');
View
315 node_modules/paperboy/lib/paperboy.js
@@ -0,0 +1,315 @@
+var
+ events = require('events'),
+ fs = require('fs'),
+ url = require('url'),
+ path = require('path');
+
+
+exports.filepath = function (webroot, url) {
+ webroot = path.resolve(webroot || '.');
+ var pathSep=process.platform =='win32' ? '\\' : '/';
+ // Unescape URL to prevent security holes
+ url = decodeURIComponent(url);
+ // Strip nullbytes (they can make us believe that the file extension isn't the one it really is)
+ url = url.replace(/\0/g, '');
+ // Append index.html if path ends with '/'
+ var fp = path.normalize(path.join(webroot, (url.match(/\/$/)=='/') ? url+'index.html' : url));
+ // Sanitize input, make sure people can't use .. to get above webroot
+ if (webroot[webroot.length - 1] !== pathSep) webroot += pathSep;
+ if (fp.substr(0, webroot.length) != webroot)
+ return(['Permission Denied', null]);
+ else
+ return([null, fp.replace('/',pathSep)]);
+};
+
+exports.streamFile = function (filepath, headerFields, stat, res, req, emitter) {
+ var
+ emitter = new events.EventEmitter(),
+ extension = filepath.split('.').pop(),
+ contentType = exports.contentTypes[extension] || 'application/octet-stream',
+ charset = exports.charsets[contentType];
+
+ process.nextTick( function() {
+ if (charset)
+ contentType += '; charset=' + charset;
+ headerFields['Content-Type'] = contentType;
+
+ var etag = '"' + stat.ino + '-' + stat.size + '-' + Date.parse(stat.mtime) +'"';
+ headerFields['ETag'] = etag;
+
+ // last-modified date should be present along with etag
+ // also in a client-side JavaScript, document.lastModified uses this header value
+ headerFields['Last-Modified'] = new Date(stat.mtime);
+
+ var statCode;
+ //Check to see if we can send a 304 and skip the send
+ if(req.headers['if-none-match'] == etag){
+ statCode = 304;
+ headerFields['Content-Length'] = 0;
+ }else {
+ headerFields['Content-Length'] = stat.size;
+ statCode = 200;
+ if (headerFields['Expires'] != undefined) {
+ var expires = new Date;
+ expires.setTime(expires.getTime() + headerFields['Expires']);
+ headerFields['Expires'] = expires.toUTCString();
+ }
+ }
+
+ res.writeHead(statCode, headerFields);
+
+ //If we sent a 304, skip sending a body
+ if (statCode == 304 || req.method === 'HEAD') {
+ res.end();
+ emitter.emit("success", statCode);
+ }
+ else {
+ fs.createReadStream(filepath,{'flags': 'r',
+ 'mode': 0666, 'bufferSize': 4 * 1024})
+ .addListener("data", function(chunk){
+ res.write(chunk, 'binary');
+ })
+ .addListener("end", function(){
+ emitter.emit("success", statCode);
+ })
+ .addListener("close",function() {
+ res.end();
+ })
+ .addListener("error", function (e) {
+ emitter.emit("error", 500, e);
+ });
+ }
+ });
+ return emitter;
+};
+
+exports.deliver = function (webroot, req, res) {
+ var
+ stream,
+ fpRes = exports.filepath(webroot, url.parse(req.url).pathname),
+ fpErr = fpRes[0],
+ filepath = fpRes[1],
+ beforeCallback,
+ afterCallback,
+ otherwiseCallback,
+ errorCallback,
+ headerFields = {},
+ addHeaderCallback,
+ delegate = {
+ error: function (callback) {
+ errorCallback = callback;
+ return delegate;
+ },
+ before: function (callback) {
+ beforeCallback = callback;
+ return delegate;
+ },
+ after: function (callback) {
+ afterCallback = callback;
+ return delegate;
+ },
+ otherwise: function (callback) {
+ otherwiseCallback = callback;
+ return delegate;
+ },
+ addHeader: function (name, value) {
+ headerFields[name] = value;
+ return delegate;
+ }
+ };
+
+ process.nextTick(function() {
+ // Create default error and otherwise callbacks if none were given.
+ errorCallback = errorCallback || function(statCode) {
+ res.writeHead(statCode, {'Content-Type': 'text/html'});
+ res.end("<h1>HTTP " + statCode + "</h1>");
+ };
+ otherwiseCallback = otherwiseCallback || function() {
+ res.writeHead(404, {'Content-Type': 'text/html'});
+ res.end("<h1>HTTP 404 File not found</h1>");
+ };
+
+ //If file is in a directory outside of the webroot, deny the request
+ if (fpErr) {
+ statCode = 403;
+ if (beforeCallback)
+ beforeCallback();
+ errorCallback(403, 'Forbidden');
+ }
+ else {
+ fs.stat(filepath, function (err, stat) {
+ if( (err || !stat.isFile())) {
+ var exactErr = err || 'File not found';
+ if (beforeCallback)
+ beforeCallback();
+ if (otherwiseCallback)
+ otherwiseCallback(exactErr);
+ } else {
+ //The before callback can abort the transfer by returning false
+ var cancel = beforeCallback && (beforeCallback() === false);
+ if (cancel && otherwiseCallback) {
+ otherwiseCallback();
+ }
+ else {
+ stream = exports.streamFile(filepath, headerFields, stat, res, req)
+
+ if(afterCallback){
+ stream.addListener("success", afterCallback);
+ }
+ if(errorCallback){
+ stream.addListener("error", errorCallback);
+ }
+ }
+ }
+ });
+ }
+ });
+
+ return delegate;
+};
+
+exports.contentTypes = {
+ "aiff": "audio/x-aiff",
+ "arj": "application/x-arj-compressed",
+ "asf": "video/x-ms-asf",
+ "asx": "video/x-ms-asx",
+ "au": "audio/ulaw",
+ "avi": "video/x-msvideo",
+ "bcpio": "application/x-bcpio",
+ "ccad": "application/clariscad",
+ "cod": "application/vnd.rim.cod",
+ "com": "application/x-msdos-program",
+ "cpio": "application/x-cpio",
+ "cpt": "application/mac-compactpro",
+ "csh": "application/x-csh",
+ "css": "text/css",
+ "cur": "image/vnd.microsoft.icon",
+ "deb": "application/x-debian-package",
+ "dl": "video/dl",
+ "doc": "application/msword",
+ "drw": "application/drafting",
+ "dvi": "application/x-dvi",
+ "dwg": "application/acad",
+ "dxf": "application/dxf",
+ "dxr": "application/x-director",
+ "etx": "text/x-setext",
+ "ez": "application/andrew-inset",
+ "fli": "video/x-fli",
+ "flv": "video/x-flv",
+ "gif": "image/gif",
+ "gl": "video/gl",
+ "gtar": "application/x-gtar",
+ "gz": "application/x-gzip",
+ "hdf": "application/x-hdf",
+ "hqx": "application/mac-binhex40",
+ "htm": "text/html",
+ "html": "text/html",
+ "ice": "x-conference/x-cooltalk",
+ "ico": "image/x-icon",
+ "ief": "image/ief",
+ "igs": "model/iges",
+ "ips": "application/x-ipscript",
+ "ipx": "application/x-ipix",
+ "jad": "text/vnd.sun.j2me.app-descriptor",
+ "jar": "application/java-archive",
+ "jpeg": "image/jpeg",
+ "jpg": "image/jpeg",
+ "js": "text/javascript",
+ "json": "application/json",
+ "latex": "application/x-latex",
+ "lsp": "application/x-lisp",
+ "lzh": "application/octet-stream",
+ "m": "text/plain",
+ "m3u": "audio/x-mpegurl",
+ "man": "application/x-troff-man",
+ "manifest": "text/cache-manifest",
+ "me": "application/x-troff-me",
+ "midi": "audio/midi",
+ "mif": "application/x-mif",
+ "mime": "www/mime",
+ "movie": "video/x-sgi-movie",
+ "mp4": "video/mp4",
+ "mpg": "video/mpeg",
+ "mpga": "audio/mpeg",
+ "ms": "application/x-troff-ms",
+ "nc": "application/x-netcdf",
+ "oda": "application/oda",
+ "ogm": "application/ogg",
+ "pbm": "image/x-portable-bitmap",
+ "pdf": "application/pdf",
+ "pgm": "image/x-portable-graymap",
+ "pgn": "application/x-chess-pgn",
+ "pgp": "application/pgp",
+ "pm": "application/x-perl",
+ "png": "image/png",
+ "pnm": "image/x-portable-anymap",
+ "ppm": "image/x-portable-pixmap",
+ "ppz": "application/vnd.ms-powerpoint",
+ "pre": "application/x-freelance",
+ "prt": "application/pro_eng",
+ "ps": "application/postscript",
+ "qt": "video/quicktime",
+ "ra": "audio/x-realaudio",
+ "rar": "application/x-rar-compressed",
+ "ras": "image/x-cmu-raster",
+ "rgb": "image/x-rgb",
+ "rm": "audio/x-pn-realaudio",
+ "rpm": "audio/x-pn-realaudio-plugin",
+ "rtf": "text/rtf",
+ "rtx": "text/richtext",
+ "scm": "application/x-lotusscreencam",
+ "set": "application/set",
+ "sgml": "text/sgml",
+ "sh": "application/x-sh",
+ "shar": "application/x-shar",
+ "silo": "model/mesh",
+ "sit": "application/x-stuffit",
+ "skt": "application/x-koan",
+ "smil": "application/smil",
+ "snd": "audio/basic",
+ "sol": "application/solids",
+ "spl": "application/x-futuresplash",
+ "src": "application/x-wais-source",
+ "stl": "application/SLA",
+ "stp": "application/STEP",
+ "sv4cpio": "application/x-sv4cpio",
+ "sv4crc": "application/x-sv4crc",
+ "svg": "image/svg+xml",
+ "swf": "application/x-shockwave-flash",
+ "tar": "application/x-tar",
+ "tcl": "application/x-tcl",
+ "tex": "application/x-tex",
+ "texinfo": "application/x-texinfo",
+ "tgz": "application/x-tar-gz",
+ "tiff": "image/tiff",
+ "tr": "application/x-troff",
+ "tsi": "audio/TSP-audio",
+ "tsp": "application/dsptype",
+ "tsv": "text/tab-separated-values",
+ "txt": "text/plain",
+ "unv": "application/i-deas",
+ "ustar": "application/x-ustar",
+ "vcd": "application/x-cdlink",
+ "vda": "application/vda",
+ "vivo": "video/vnd.vivo",
+ "vrm": "x-world/x-vrml",
+ "wav": "audio/x-wav",
+ "wax": "audio/x-ms-wax",
+ "wma": "audio/x-ms-wma",
+ "wmv": "video/x-ms-wmv",
+ "wmx": "video/x-ms-wmx",
+ "wrl": "model/vrml",
+ "wvx": "video/x-ms-wvx",
+ "xbm": "image/x-xbitmap",
+ "xlw": "application/vnd.ms-excel",
+ "xml": "text/xml",
+ "xpm": "image/x-xpixmap",
+ "xwd": "image/x-xwindowdump",
+ "xyz": "chemical/x-pdb",
+ "zip": "application/zip"
+};
+
+exports.charsets = {
+ 'text/javascript': 'UTF-8',
+ 'text/html': 'UTF-8'
+};
View
36 node_modules/paperboy/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "paperboy",
+ "author": {
+ "name": "Felix Geisendörfer",
+ "email": "felix@debuggable.com"
+ },
+ "version": "0.0.5",
+ "description": "A node.js module for delivering static files.",
+ "keywords": [
+ "web",
+ "server"
+ ],
+ "directories": {
+ "lib": "lib"
+ },
+ "main": "lib/paperboy",
+ "dependencies": {},
+ "devDependencies": {},
+ "engines": {
+ "node": "*"
+ },
+ "optionalDependencies": {},
+ "_npmUser": {
+ "name": "vadimon",
+ "email": "vadimon@gmail.com"
+ },
+ "_id": "paperboy@0.0.5",
+ "_engineSupported": true,
+ "_npmVersion": "1.1.18",
+ "_nodeVersion": "v0.6.14",
+ "_defaultsLoaded": true,
+ "dist": {
+ "shasum": "0ff35204c532289f0156b577456e6f581ed348bc"
+ },
+ "_from": "paperboy"
+}
View
6 node_modules/paperboy/seed.yml
@@ -0,0 +1,6 @@
+---
+ name: paperboy
+ author: Felix Geisendörfer <felix@debuggable.com>
+ version: 0.0.1
+ description: A node.js module for delivering static files.
+ tags: web server
View
3  node_modules/socket.io/.npmignore
@@ -0,0 +1,3 @@
+support
+test
+examples
View
6 node_modules/socket.io/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - 0.6
+
+notifications:
+ irc: "irc.freenode.org#socket.io"
View
284 node_modules/socket.io/History.md
@@ -0,0 +1,284 @@
+
+0.9.9 / 2012-08-01
+==================
+
+ * Fixed sync disconnect xhrs handling
+ * Put license text in its own file (#965)
+ * Add warning to .listen() to ease the migration to Express 3.x
+ * Restored compatibility with node 0.4.x
+
+0.9.8 / 2012-07-24
+==================
+
+ * Bumped client.
+
+0.9.7 / 2012-07-24
+==================
+
+ * Prevent crash when socket leaves a room twice.
+ * Corrects unsafe usage of for..in
+ * Fix for node 0.8 with `gzip compression` [vadimi]
+ * Update redis to support Node 0.8.x
+ * Made ID generation securely random
+ * Fix Redis Store race condition in manager onOpen unsubscribe callback
+ * Fix for EventEmitters always reusing the same Array instance for listeners
+
+0.9.6 / 2012-04-17
+==================
+
+ * Fixed XSS in jsonp-polling.
+
+0.9.5 / 2012-04-05
+==================
+
+ * Added test for polling and socket close.
+ * Ensure close upon request close.
+ * Fix disconnection reason being lost for polling transports.
+ * Ensure that polling transports work with Connection: close.
+ * Log disconnection reason.
+
+0.9.4 / 2012-04-01
+==================
+
+ * Disconnecting from namespace improvement (#795) [DanielBaulig]
+ * Bumped client with polling reconnection loop (#438)
+
+0.9.3 / 2012-03-28
+==================
+
+ * Fix "Syntax error" on FF Web Console with XHR Polling [mikito]
+
+0.9.2 / 2012-03-13
+==================
+
+ * More sensible close `timeout default` (fixes disconnect issue)
+
+0.9.1-1 / 2012-03-02
+====================
+
+ * Bumped client with NPM dependency fix.
+
+0.9.1 / 2012-03-02
+==================
+
+ * Changed heartbeat timeout and interval defaults (60 and 25 seconds)
+ * Make tests work both on 0.4 and 0.6
+ * Updated client (improvements + bug fixes).
+
+0.9.0 / 2012-02-26
+==================
+
+ * Make it possible to use a regexp to match the socket.io resource URL.
+ We need this because we have to prefix the socket.io URL with a variable ID.
+ * Supplemental fix to gavinuhma/authfix, it looks like the same Access-Control-Origin logic is needed in the http and xhr-polling transports
+ * Updated express dep for windows compatibility.
+ * Combine two substr calls into one in decodePayload to improve performance
+ * Minor documentation fix
+ * Minor. Conform to style of other files.
+ * Switching setting to 'match origin protocol'
+ * Revert "Fixes leaking Redis subscriptions for #663. The local flag was not getting passed through onClientDisconnect()."
+ * Revert "Handle leaked dispatch:[id] subscription."
+ * Merge pull request #667 from dshaw/patch/redis-disconnect
+ * Handle leaked dispatch:[id] subscription.
+ * Fixes leaking Redis subscriptions for #663. The local flag was not getting passed through onClientDisconnect().
+ * Prevent memory leaking on uncompleted requests & add max post size limitation
+ * Fix for testcase
+ * Set Access-Control-Allow-Credentials true, regardless of cookie
+ * Remove assertvarnish from package as it breaks on 0.6
+ * Correct irc channel
+ * Added proper return after reserved field error
+ * Fixes manager.js failure to close connection after transport error has happened
+ * Added implicit port 80 for origin checks. fixes #638
+ * Fixed bug #432 in 0.8.7
+ * Set Access-Control-Allow-Origin header to origin to enable withCredentials
+ * Adding configuration variable matchOriginProtocol
+ * Fixes location mismatch error in Safari.
+ * Use tty to detect if we should add colors or not by default.
+ * Updated the package location.
+
+0.8.7 / 2011-11-05
+==================
+
+ * Fixed memory leaks in closed clients.
+ * Fixed memory leaks in namespaces.
+ * Fixed websocket handling for malformed requests from proxies. [einaros]
+ * Node 0.6 compatibility. [einaros] [3rd-Eden]
+ * Adapted tests and examples.
+
+0.8.6 / 2011-10-27
+==================
+
+ * Added JSON decoding on jsonp-polling transport.
+ * Fixed README example.
+ * Major speed optimizations [3rd-Eden] [einaros] [visionmedia]
+ * Added decode/encode benchmarks [visionmedia]
+ * Added support for black-listing client sent events.
+ * Fixed logging options, closes #540 [3rd-Eden]
+ * Added vary header for gzip [3rd-Eden]
+ * Properly cleaned up async websocket / flashsocket tests, after patching node-websocket-client
+ * Patched to properly shut down when a finishClose call is made during connection establishment
+ * Added support for socket.io version on url and far-future Expires [3rd-Eden] [getify]
+ * Began IE10 compatibility [einaros] [tbranyen]
+ * Misc WebSocket fixes [einaros]
+ * Added UTF8 to respone headers for htmlfile [3rd-Eden]
+
+0.8.5 / 2011-10-07
+==================
+
+ * Added websocket draft HyBi-16 support. [einaros]
+ * Fixed websocket continuation bugs. [einaros]
+ * Fixed flashsocket transport name.
+ * Fixed websocket tests.
+ * Ensured `parser#decodePayload` doesn't choke.
+ * Added http referrer verification to manager verifyOrigin.
+ * Added access control for cross domain xhr handshakes [3rd-Eden]
+ * Added support for automatic generation of socket.io files [3rd-Eden]
+ * Added websocket binary support [einaros]
+ * Added gzip support for socket.io.js [3rd-Eden]
+ * Expose socket.transport [3rd-Eden]
+ * Updated client.
+
+0.8.4 / 2011-09-06
+==================
+
+ * Client build
+
+0.8.3 / 2011-09-03
+==================
+
+ * Fixed `\n` parsing for non-JSON packets (fixes #479).
+ * Fixed parsing of certain unicode characters (fixes #451).
+ * Fixed transport message packet logging.
+ * Fixed emission of `error` event resulting in an uncaught exception if unhandled (fixes #476).
+ * Fixed; allow for falsy values as the configuration value of `log level` (fixes #491).
+ * Fixed repository URI in `package.json`. Fixes #504.
+ * Added text/plain content-type to handshake responses [einaros]
+ * Improved single byte writes [einaros]
+ * Updated socket.io-flashsocket default port from 843 to 10843 [3rd-Eden]
+ * Updated client.
+
+0.8.2 / 2011-08-29
+==================
+
+ * Updated client.
+
+0.8.1 / 2011-08-29
+==================
+
+ * Fixed utf8 bug in send framing in websocket [einaros]
+ * Fixed typo in docs [Znarkus]
+ * Fixed bug in send framing for over 64kB of data in websocket [einaros]
+ * Corrected ping handling in websocket transport [einaros]
+
+0.8.0 / 2011-08-28
+==================
+
+ * Updated to work with two-level websocket versioning. [einaros]
+ * Added hybi07 support. [einaros]
+ * Added hybi10 support. [einaros]
+ * Added http referrer verification to manager.js verifyOrigin. [einaors]
+
+0.7.11 / 2011-08-27
+===================
+
+ * Updated socket.io-client.
+
+0.7.10 / 2011-08-27
+===================
+
+ * Updated socket.io-client.
+
+0.7.9 / 2011-08-12
+==================
+
+ * Updated socket.io-client.
+ * Make sure we only do garbage collection when the server we receive is actually run.
+
+0.7.8 / 2011-08-08
+==================
+
+ * Changed; make sure sio#listen passes options to both HTTP server and socket.io manager.
+ * Added docs for sio#listen.
+ * Added options parameter support for Manager constructor.
+ * Added memory leaks tests and test-leaks Makefile task.
+ * Removed auto npm-linking from make test.
+ * Make sure that you can disable heartbeats. [3rd-Eden]
+ * Fixed rooms memory leak [3rd-Eden]
+ * Send response once we got all POST data, not immediately [Pita]
+ * Fixed onLeave behavior with missing clientsk [3rd-Eden]
+ * Prevent duplicate references in rooms.
+ * Added alias for `to` to `in` and `in` to `to`.
+ * Fixed roomClients definition.
+ * Removed dependency on redis for installation without npm [3rd-Eden]
+ * Expose path and querystring in handshakeData [3rd-Eden]
+
+0.7.7 / 2011-07-12
+==================
+
+ * Fixed double dispatch handling with emit to closed clients.
+ * Added test for emitting to closed clients to prevent regression.
+ * Fixed race condition in redis test.
+ * Changed Transport#end instrumentation.
+ * Leveraged $emit instead of emit internally.
+ * Made tests faster.
+ * Fixed double disconnect events.
+ * Fixed disconnect logic
+ * Simplified remote events handling in Socket.
+ * Increased testcase timeout.
+ * Fixed unknown room emitting (GH-291). [3rd-Eden]
+ * Fixed `address` in handshakeData. [3rd-Eden]
+ * Removed transports definition in chat example.
+ * Fixed room cleanup
+ * Fixed; make sure the client is cleaned up after booting.
+ * Make sure to mark the client as non-open if the connection is closed.
+ * Removed unneeded `buffer` declarations.
+ * Fixed; make sure to clear socket handlers and subscriptions upon transport close.
+
+0.7.6 / 2011-06-30
+==================
+
+ * Fixed general dispatching when a client has closed.
+
+0.7.5 / 2011-06-30
+==================
+
+ * Fixed dispatching to clients that are disconnected.
+
+0.7.4 / 2011-06-30
+==================
+
+ * Fixed; only clear handlers if they were set. [level09]
+
+0.7.3 / 2011-06-30
+==================
+
+ * Exposed handshake data to clients.
+ * Refactored dispatcher interface.
+ * Changed; Moved id generation method into the manager.
+ * Added sub-namespace authorization. [3rd-Eden]
+ * Changed; normalized SocketNamespace local eventing [dvv]
+ * Changed; Use packet.reason or default to 'packet' [3rd-Eden]
+ * Changed console.error to console.log.
+ * Fixed; bind both servers at the same time do that the test never times out.
+ * Added 304 support.
+ * Removed `Transport#name` for abstract interface.
+ * Changed; lazily require http and https module only when needed. [3rd-Eden]
+
+0.7.2 / 2011-06-22
+==================
+
+ * Make sure to write a packet (of type `noop`) when closing a poll.
+ This solves a problem with cross-domain requests being flagged as aborted and
+ reconnection being triggered.
+ * Added `noop` message type.
+
+0.7.1 / 2011-06-21
+==================
+
+ * Fixed cross-domain XHR.
+ * Added CORS test to xhr-polling suite.
+
+0.7.0 / 2010-06-21
+==================
+
+ * http://socket.io/announcement.html
View
22 node_modules/socket.io/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2011 Guillermo Rauch <guillermo@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.
View
31 node_modules/socket.io/Makefile
@@ -0,0 +1,31 @@
+
+ALL_TESTS = $(shell find test/ -name '*.test.js')
+ALL_BENCH = $(shell find benchmarks -name '*.bench.js')
+
+run-tests:
+ @./node_modules/.bin/expresso \
+ -t 3000 \
+ -I support \
+ --serial \
+ $(TESTFLAGS) \
+ $(TESTS)
+
+test:
+ @$(MAKE) NODE_PATH=lib TESTS="$(ALL_TESTS)" run-tests
+
+test-cov:
+ @TESTFLAGS=--cov $(MAKE) test
+
+test-leaks:
+ @ls test/leaks/* | xargs node --expose_debug_as=debug --expose_gc
+
+run-bench:
+ @node $(PROFILEFLAGS) benchmarks/runner.js
+
+bench:
+ @$(MAKE) BENCHMARKS="$(ALL_BENCH)" run-bench
+
+profile:
+ @PROFILEFLAGS='--prof --trace-opt --trace-bailout --trace-deopt' $(MAKE) bench
+
+.PHONY: test bench profile
View
345 node_modules/socket.io/Readme.md
@@ -0,0 +1,345 @@
+# Socket.IO
+
+Socket.IO is a Node.JS project that makes WebSockets and realtime possible in
+all browsers. It also enhances WebSockets by providing built-in multiplexing,
+horizontal scalability, automatic JSON encoding/decoding, and more.
+
+## How to Install
+
+```bash
+npm install socket.io
+```
+
+## How to use
+
+First, require `socket.io`:
+
+```js
+var io = require('socket.io');
+```
+
+Next, attach it to a HTTP/HTTPS server. If you're using the fantastic `express`
+web framework:
+
+```js
+var app = express.createServer()
+ , io = io.listen(app);
+
+app.listen(80);
+
+io.sockets.on('connection', function (socket) {
+ socket.emit('news', { hello: 'world' });
+ socket.on('my other event', function (data) {
+ console.log(data);
+ });
+});
+```
+
+Finally, load it from the client side code:
+
+```html
+<script src="/socket.io/socket.io.js"></script>
+<script>
+ var socket = io.connect('http://localhost');
+ socket.on('news', function (data) {
+ console.log(data);
+ socket.emit('my other event', { my: 'data' });
+ });
+</script>
+```
+
+For more thorough examples, look at the `examples/` directory.
+
+## Short recipes
+
+### Sending and receiving events.
+
+Socket.IO allows you to emit and receive custom events.
+Besides `connect`, `message` and `disconnect`, you can emit custom events:
+
+```js
+// note, io.listen(<port>) will create a http server for you
+var io = require('socket.io').listen(80);
+
+io.sockets.on('connection', function (socket) {
+ io.sockets.emit('this', { will: 'be received by everyone' });
+
+ socket.on('private message', function (from, msg) {
+ console.log('I received a private message by ', from, ' saying ', msg);
+ });
+
+ socket.on('disconnect', function () {
+ io.sockets.emit('user disconnected');
+ });
+});
+```
+
+### Storing data associated to a client
+
+Sometimes it's necessary to store data associated with a client that's
+necessary for the duration of the session.
+
+#### Server side
+
+```js
+var io = require('socket.io').listen(80);
+
+io.sockets.on('connection', function (socket) {
+ socket.on('set nickname', function (name) {
+ socket.set('nickname', name, function () { socket.emit('ready'); });
+ });
+
+ socket.on('msg', function () {
+ socket.get('nickname', function (err, name) {
+ console.log('Chat message by ', name);
+ });
+ });
+});
+```
+
+#### Client side
+
+```html
+<script>
+ var socket = io.connect('http://localhost');
+
+ socket.on('connect', function () {
+ socket.emit('set nickname', prompt('What is your nickname?'));
+ socket.on('ready', function () {
+ console.log('Connected !');
+ socket.emit('msg', prompt('What is your message?'));
+ });
+ });
+</script>
+```
+
+### Restricting yourself to a namespace
+
+If you have control over all the messages and events emitted for a particular
+application, using the default `/` namespace works.
+
+If you want to leverage 3rd-party code, or produce code to share with others,
+socket.io provides a way of namespacing a `socket`.
+
+This has the benefit of `multiplexing` a single connection. Instead of
+socket.io using two `WebSocket` connections, it'll use one.
+
+The following example defines a socket that listens on '/chat' and one for
+'/news':
+
+#### Server side
+
+```js
+var io = require('socket.io').listen(80);
+
+var chat = io
+ .of('/chat')
+ .on('connection', function (socket) {
+ socket.emit('a message', { that: 'only', '/chat': 'will get' });
+ chat.emit('a message', { everyone: 'in', '/chat': 'will get' });
+ });
+
+var news = io
+ .of('/news');
+ .on('connection', function (socket) {
+ socket.emit('item', { news: 'item' });
+ });
+```
+
+#### Client side:
+
+```html
+<script>
+ var chat = io.connect('http://localhost/chat')
+ , news = io.connect('http://localhost/news');
+
+ chat.on('connect', function () {
+ chat.emit('hi!');
+ });
+
+ news.on('news', function () {
+ news.emit('woot');
+ });
+</script>
+```
+
+### Sending volatile messages.
+
+Sometimes certain messages can be dropped. Let's say you have an app that
+shows realtime tweets for the keyword `bieber`.
+
+If a certain client is not ready to receive messages (because of network slowness
+or other issues, or because he's connected through long polling and is in the
+middle of a request-response cycle), if he doesn't receive ALL the tweets related
+to bieber your application won't suffer.
+
+In that case, you might want to send those messages as volatile messages.
+
+#### Server side
+
+```js
+var io = require('socket.io').listen(80);
+
+io.sockets.on('connection', function (socket) {
+ var tweets = setInterval(function () {
+ getBieberTweet(function (tweet) {
+ socket.volatile.emit('bieber tweet', tweet);
+ });
+ }, 100);
+
+ socket.on('disconnect', function () {
+ clearInterval(tweets);
+ });
+});
+```
+
+#### Client side
+
+In the client side, messages are received the same way whether they're volatile
+or not.
+
+### Getting acknowledgements
+
+Sometimes, you might want to get a callback when the client confirmed the message
+reception.
+
+To do this, simply pass a function as the last parameter of `.send` or `.emit`.
+What's more, when you use `.emit`, the acknowledgement is done by you, which
+means you can also pass data along:
+
+#### Server side
+
+```js
+var io = require('socket.io').listen(80);
+
+io.sockets.on('connection', function (socket) {
+ socket.on('ferret', function (name, fn) {
+ fn('woot');
+ });
+});
+```
+
+#### Client side
+
+```html
+<script>
+ var socket = io.connect(); // TIP: .connect with no args does auto-discovery
+ socket.on('connect', function () { // TIP: you can avoid listening on `connect` and listen on events directly too!
+ socket.emit('ferret', 'tobi', function (data) {
+ console.log(data); // data will be 'woot'
+ });
+ });
+</script>
+```
+
+### Broadcasting messages
+
+To broadcast, simply add a `broadcast` flag to `emit` and `send` method calls.
+Broadcasting means sending a message to everyone else except for the socket
+that starts it.
+
+#### Server side
+
+```js
+var io = require('socket.io').listen(80);
+
+io.sockets.on('connection', function (socket) {
+ socket.broadcast.emit('user connected');
+ socket.broadcast.json.send({ a: 'message' });
+});
+```
+
+### Rooms
+
+Sometimes you want to put certain sockets in the same room, so that it's easy
+to broadcast to all of them together.
+
+Think of this as built-in channels for sockets. Sockets `join` and `leave`
+rooms in each socket.
+
+#### Server side
+
+```js
+var io = require('socket.io').listen(80);
+
+io.sockets.on('connection', function (socket) {
+ socket.join('justin bieber fans');
+ socket.broadcast.to('justin bieber fans').emit('new fan');
+ io.sockets.in('rammstein fans').emit('new non-fan');
+});
+```
+
+### Using it just as a cross-browser WebSocket
+
+If you just want the WebSocket semantics, you can do that too.
+Simply leverage `send` and listen on the `message` event:
+
+#### Server side
+
+```js
+var io = require('socket.io').listen(80);
+
+io.sockets.on('connection', function (socket) {
+ socket.on('message', function () { });
+ socket.on('disconnect', function () { });
+});
+```
+
+#### Client side
+
+```html
+<script>
+ var socket = io.connect('http://localhost/');
+ socket.on('connect', function () {
+ socket.send('hi');
+
+ socket.on('message', function (msg) {
+ // my msg
+ });
+ });
+</script>
+```
+
+### Changing configuration
+
+Configuration in socket.io is TJ-style:
+
+#### Server side
+
+```js
+var io = require('socket.io').listen(80);
+
+io.configure(function () {
+ io.set('transports', ['websocket', 'flashsocket', 'xhr-polling']);
+});
+
+io.configure('development', function () {
+ io.set('transports', ['websocket', 'xhr-polling']);
+ io.enable('log');
+});
+```
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2011 Guillermo Rauch &lt;guillermo@learnboost.com&gt;
+
+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.
View
64 node_modules/socket.io/benchmarks/decode.bench.js
@@ -0,0 +1,64 @@
+
+/**
+ * Module dependencies.
+ */
+
+var benchmark = require('benchmark')
+ , colors = require('colors')
+ , io = require('../')
+ , parser = io.parser
+ , suite = new benchmark.Suite('Decode packet');
+
+suite.add('string', function () {
+ parser.decodePacket('4:::"2"');
+});
+
+suite.add('event', function () {
+ parser.decodePacket('5:::{"name":"woot"}');
+});
+
+suite.add('event+ack', function () {
+ parser.decodePacket('5:1+::{"name":"tobi"}');
+});
+
+suite.add('event+data', function () {
+ parser.decodePacket('5:::{"name":"edwald","args":[{"a": "b"},2,"3"]}');
+});
+
+suite.add('heartbeat', function () {
+ parser.decodePacket('2:::');
+});
+
+suite.add('error', function () {
+ parser.decodePacket('7:::2+0');
+});
+
+var payload = parser.encodePayload([
+ parser.encodePacket({ type: 'message', data: '5', endpoint: '' })
+ , parser.encodePacket({ type: 'message', data: '53d', endpoint: '' })
+ , parser.encodePacket({ type: 'message', data: 'foobar', endpoint: '' })
+ , parser.encodePacket({ type: 'message', data: 'foobarbaz', endpoint: '' })
+ , parser.encodePacket({ type: 'message', data: 'foobarbazfoobarbaz', endpoint: '' })
+ , parser.encodePacket({ type: 'message', data: 'foobarbaz', endpoint: '' })
+ , parser.encodePacket({ type: 'message', data: 'foobar', endpoint: '' })
+]);
+
+suite.add('payload', function () {
+ parser.decodePayload(payload);
+});
+
+suite.on('cycle', function (bench, details) {
+ console.log('\n' + suite.name.grey, details.name.white.bold);
+ console.log([
+ details.hz.toFixed(2).cyan + ' ops/sec'.grey
+ , details.count.toString().white + ' times executed'.grey
+ , 'benchmark took '.grey + details.times.elapsed.toString().white + ' sec.'.grey
+ ,
+ ].join(', '.grey));
+});
+
+if (!module.parent) {
+ suite.run();
+} else {
+ module.exports = suite;
+}
View
90 node_modules/socket.io/benchmarks/encode.bench.js
@@ -0,0 +1,90 @@
+
+/**
+ * Module dependencies.
+ */
+
+var benchmark = require('benchmark')
+ , colors = require('colors')
+ , io = require('../')
+ , parser = io.parser
+ , suite = new benchmark.Suite('Encode packet');
+
+suite.add('string', function () {
+ parser.encodePacket({
+ type: 'json'
+ , endpoint: ''
+ , data: '2'
+ });
+});
+
+suite.add('event', function () {
+ parser.encodePacket({
+ type: 'event'
+ , name: 'woot'
+ , endpoint: ''
+ , args: []
+ });
+});
+
+suite.add('event+ack', function () {
+ parser.encodePacket({
+ type: 'json'
+ , id: 1
+ , ack: 'data'
+ , endpoint: ''
+ , data: { a: 'b' }
+ });
+});
+
+suite.add('event+data', function () {
+ parser.encodePacket({
+ type: 'event'
+ , name: 'edwald'
+ , endpoint: ''
+ , args: [{a: 'b'}, 2, '3']
+ });
+});
+
+suite.add('heartbeat', function () {
+ parser.encodePacket({
+ type: 'heartbeat'
+ , endpoint: ''
+ })
+});
+
+suite.add('error', function () {
+ parser.encodePacket({
+ type: 'error'
+ , reason: 'unauthorized'
+ , advice: 'reconnect'
+ , endpoint: ''
+ })
+})
+
+suite.add('payload', function () {
+ parser.encodePayload([
+ parser.encodePacket({ type: 'message', data: '5', endpoint: '' })
+ , parser.encodePacket({ type: 'message', data: '53d', endpoint: '' })
+ , parser.encodePacket({ type: 'message', data: 'foobar', endpoint: '' })
+ , parser.encodePacket({ type: 'message', data: 'foobarbaz', endpoint: '' })
+ , parser.encodePacket({ type: 'message', data: 'foobarbazfoobarbaz', endpoint: '' })
+ , parser.encodePacket({ type: 'message', data: 'foobarbaz', endpoint: '' })
+ , parser.encodePacket({ type: 'message', data: 'foobar', endpoint: '' })
+ ]);
+});
+
+suite.on('cycle', function (bench, details) {
+ console.log('\n' + suite.name.grey, details.name.white.bold);
+ console.log([
+ details.hz.toFixed(2).cyan + ' ops/sec'.grey
+ , details.count.toString().white + ' times executed'.grey
+ , 'benchmark took '.grey + details.times.elapsed.toString().white + ' sec.'.grey
+ ,
+ ].join(', '.grey));
+});
+
+if (!module.parent) {
+ suite.run();
+} else {
+ module.exports = suite;
+}
View
55 node_modules/socket.io/benchmarks/runner.js
@@ -0,0 +1,55 @@
+/**
+ * Benchmark runner dependencies
+ */
+
+var colors = require('colors')
+ , path = require('path');
+
+/**
+ * Find all the benchmarks
+ */
+
+var benchmarks_files = process.env.BENCHMARKS.split(' ')
+ , all = [].concat(benchmarks_files)
+ , first = all.shift()
+ , benchmarks = {};
+
+// find the benchmarks and load them all in our obj
+benchmarks_files.forEach(function (file) {
+ benchmarks[file] = require(path.join(__dirname, '..', file));
+});
+
+// setup the complete listeners
+benchmarks_files.forEach(function (file) {
+ var benchmark = benchmarks[file]
+ , next_file = all.shift()
+ , next = benchmarks[next_file];
+
+ /**
+ * Generate a oncomplete function for the tests, either we are done or we
+ * have more benchmarks to process.
+ */
+
+ function complete () {
+ if (!next) {
+ console.log(
+ '\n\nBenchmark completed in'.grey
+ , (Date.now() - start).toString().green + ' ms'.grey
+ );
+ } else {
+ console.log('\nStarting benchmark '.grey + next_file.yellow);
+ next.run();
+ }
+ }
+
+ // attach the listener
+ benchmark.on('complete', complete);
+});
+
+/**
+ * Start the benchmark
+ */
+
+var start = Date.now();
+console.log('Starting benchmark '.grey + first.yellow);
+benchmarks[first].run();
View
8 node_modules/socket.io/index.js
@@ -0,0 +1,8 @@
+
+/*!
+ * socket.io-node
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+module.exports = require('./lib/socket.io');
View
167 node_modules/socket.io/lib/client.js
@@ -0,0 +1,167 @@
+
+/**
+ * Module dependencies.
+ */
+
+var parser = require('socket.io-client').parser
+ , EventEmitter = require('events').EventEmitter
+
+/**
+ * Client constructor.
+ *
+ * @api public
+ */
+
+function Client (id, server) {
+ this.id = id;
+ this.acks = {};
+ this.store = server.store;
+
+ var self = this;
+
+ store.subscribe(id, function (packet) {
+
+ });
+
+ store.subscribe(id + '.disconect', function () {
+ self.onDisconnect();
+ });
+}
+
+/**
+ * Inherits from EventEmitter.
+ */
+
+Client.prototype.__proto__ = EventEmitter.prototype;
+
+/**
+ * Save reference to original `emit`.
+ *
+ * @api private
+ */
+
+Client.prototype._emit = Client.prototype.emit;
+
+/**
+ * Broadcast flag.
+ *
+ * @api public
+ */
+
+Client.prototype.__defineGetter__('broadcast', function () {
+ this.flags.broadcast = true;
+});
+
+/**
+ * JSON flag (deprecated)
+ *
+ * @api public
+ */
+
+Client.prototype.__defineGetter__('json', function () {
+ this.flags.broadcast = true;
+});
+
+/**
+ * Joins a group.
+ *
+ * @param {String} group
+ * @return {Client} for chaining
+ * @api public
+ */
+
+Client.prototype.join = function (group, fn) {
+ if (!~this.subscriptions.indexOf(group)) {
+ var self = this;
+ this.subscriptions.push(group);
+ this.store.addToGroup(group, this.sid, function (ev, args) {
+ self.onGroupEvent(ev, args);
+ }, fn);
+ } else {
+ fn && fn();
+ }
+
+ return this;
+};
+
+/**
+ * Leaves a group.
+ *
+ * @return {Client} for chaining
+ * @api public
+ */
+
+Client.prototype.leave = function (group) {
+ var index = this.subscriptions.indexOf(group);
+ if (~index) {
+ this.subscriptions.splice(index, 1);
+ }
+ return this;
+};
+
+Client.prototype.disconnect = function () {
+ if (this.socket) {
+ this.socket.disconnect();
+ } else {
+ this.publish('disconnect');
+ }
+}
+
+/**
+ * Called upon disconnect.
+ *
+ * @api private
+ */
+
+Client.prototype.onDisconnect = function () {
+ for (var i = 0, l = this.subscriptions; i < l; i++) {
+ this.store.removeFromGroup(id, group, fn);
+ }
+};
+
+/**
+ * Registers ACK.
+ */
+
+Client.prototype.ack = function (fn, callback) {
+ this.subscribe('ack');
+};
+
+/**
+ * Emits an event.
+ */
+
+Client.prototype.emit = function () {
+ var args = toArray(arguments), fn;
+
+ if ('function' == typeof args[args.length - 1]) {
+ fn = args.pop();
+ }
+
+ var data = args.shift();
+ if (args.length) {
+ data += '\n' + JSON.stringify(args);
+ }
+
+ if (fn) {
+ this.ack(fn, function (id) {
+ self.sendPacket('event', data, id);
+ });
+ } else {
+ this.sendPacket('event', data);
+ }
+
+ return this;
+};
+
+/**
+ * Sends a packet.
+ */
+
+Client.prototype.sendPacket = function (type, data, id) {
+ var data = parser.encode({ type: type, data: data, id: id });
+
+ if (this.server.sockets[id]) {
+ this.server.sockets[id].write(data);
+ }
+};
View
97 node_modules/socket.io/lib/logger.js
@@ -0,0 +1,97 @@
+
+/*!
+ * socket.io-node
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var util = require('./util')
+ , toArray = util.toArray;
+
+/**
+ * Log levels.
+ */
+
+var levels = [
+ 'error'
+ , 'warn'
+ , 'info'
+ , 'debug'
+];
+
+/**
+ * Colors for log levels.
+ */
+
+var colors = [
+ 31
+ , 33
+ , 36
+ , 90
+];
+
+/**
+ * Pads the nice output to the longest log level.
+ */
+
+function pad (str) {
+ var max = 0;
+
+ for (var i = 0, l = levels.length; i < l; i++)
+ max = Math.max(max, levels[i].length);
+
+ if (str.length < max)
+ return str + new Array(max - str.length + 1).join(' ');
+
+ return str;
+};
+
+/**
+ * Logger (console).
+ *
+ * @api public
+ */
+
+var Logger = module.exports = function (opts) {
+ opts = opts || {}
+ this.colors = false !== opts.colors;
+ this.level = 3;
+ this.enabled = true;
+};
+
+/**
+ * Log method.
+ *
+ * @api public
+ */
+
+Logger.prototype.log = function (type) {
+ var index = levels.indexOf(type);
+
+ if (index > this.level || !this.enabled)
+ return this;
+
+ console.log.apply(
+ console
+ , [this.colors
+ ? ' \033[' + colors[index] + 'm' + pad(type) + ' -\033[39m'
+ : type + ':'
+ ].concat(toArray(arguments).slice(1))
+ );
+
+ return this;
+};
+
+/**
+ * Generate methods.
+ */
+
+levels.forEach(function (name) {
+ Logger.prototype[name] = function () {
+ this.log.apply(this, [name].concat(toArray(arguments)));
+ };
+});
View
1,025 node_modules/socket.io/lib/manager.js
@@ -0,0 +1,1025 @@
+/*!
+ * socket.io-node
+ * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var fs = require('fs')
+ , url = require('url')
+ , tty = require('tty')
+ , crypto = require('crypto')
+ , util = require('./util')
+ , store = require('./store')
+ , client = require('socket.io-client')
+ , transports = require('./transports')
+ , Logger = require('./logger')
+ , Socket = require('./socket')
+ , MemoryStore = require('./stores/memory')
+ , SocketNamespace = require('./namespace')
+ , Static = require('./static')
+ , EventEmitter = process.EventEmitter;
+
+/**
+ * Export the constructor.
+ */
+
+exports = module.exports = Manager;
+
+/**
+ * Default transports.
+ */
+
+var defaultTransports = exports.defaultTransports = [
+ 'websocket'
+ , 'htmlfile'
+ , 'xhr-polling'
+ , 'jsonp-polling'
+];
+
+/**
+ * Inherited defaults.
+ */
+
+var parent = module.parent.exports
+ , protocol = parent.protocol
+ , jsonpolling_re = /^\d+$/;
+
+/**
+ * Manager constructor.
+ *
+ * @param {HTTPServer} server
+ * @param {Object} options, optional
+ * @api public
+ */
+
+function Manager (server, options) {
+ this.server = server;
+ this.namespaces = {};
+ this.sockets = this.of('');
+ this.settings = {
+ origins: '*:*'
+ , log: true
+ , store: new MemoryStore
+ , logger: new Logger
+ , static: new Static(this)
+ , heartbeats: true
+ , resource: '/socket.io'
+ , transports: defaultTransports
+ , authorization: false
+ , blacklist: ['disconnect']
+ , 'log level': 3
+ , 'log colors': tty.isatty(process.stdout.fd)
+ , 'close timeout': 60
+ , 'heartbeat interval': 25
+ , 'heartbeat timeout': 60
+ , 'polling duration': 20
+ , 'flash policy server': true
+ , 'flash policy port': 10843
+ , 'destroy upgrade': true
+ , 'destroy buffer size': 10E7
+ , 'browser client': true
+ , 'browser client cache': true
+ , 'browser client minification': false
+ , 'browser client etag': false
+ , 'browser client expires': 315360000
+ ,