Permalink
Browse files

Preparing for node-websocket-protocol / v2.0.00.

DO NOT USE, WAIT FOR v2.0.00, THE SERVER WILL NOT RUN 
WITH THIS CODE AT PRESENT.

Changes:
    - added dependency on "websocket-protocol"
    - added node_modules to .gitignore
    - removed old files that weren't really needed / in use.
    - renamed internal variables in lib/ws/server.js
    - added exports for Connection and Manager to lib/ws/server.js
    - removed old protocol code in lib/ws/connection.js
    - changed internal code for Connections (refactor)
    - changed API for the Connection "message" event, see note#1

Notes:
    1. The API for the Connection "message" event is now:
            connection.on("message", function(type, data) {
              // ...
            });
       
       This change is in order to support the receiving of Binary 
       WebSocket frames. The 'type' argument indicates whether the
       message is a UTF8 string or whether the message is a binary
       message. This in turn changes the data type of the 'data'
       argument between being a String or a Buffer.
  • Loading branch information...
1 parent 29ba5f0 commit 82217958b8b46728aa1fe99ef51ada4006a1d6ad @miksago miksago committed Aug 16, 2011
Showing with 236 additions and 604 deletions.
  1. +1 −0 .gitignore
  2. +2 −2 lib/_events.js
  3. +0 −1 lib/_util.js
  4. +189 −412 lib/ws/connection.js
  5. +2 −2 lib/ws/manager.js
  6. +0 −141 lib/ws/parser.js
  7. +36 −44 lib/ws/server.js
  8. +1 −1 package.json
  9. +5 −1 tools/release.js
View
@@ -1 +1,2 @@
*.pyc
+node_modules
View
@@ -1,5 +1,5 @@
-var util = require('./_util'),
- events = require('events');
+var util = require(process.binding('natives').util ? 'util' : 'sys');
+var events = require('events');
EventEmitter = exports.EventEmitter = function() {
events.EventEmitter.call(this);
View
@@ -1 +0,0 @@
-module.exports = require(process.binding('natives').util ? 'util' : 'sys');
Oops, something went wrong.

0 comments on commit 8221795

Please sign in to comment.