Browse Source

SOURCE -> PEER

Michelle Bu 12 years ago
parent
commit
6475fa0c37
2 changed files with 6 additions and 14 deletions
  1. 2 13
      lib/server.js
  2. 4 1
      package.json

+ 2 - 13
lib/server.js

@@ -37,19 +37,8 @@ function PeerServer(options) {
 
       switch (message.type) {
         // Source connected -- send back its ID.
-        case 'SOURCE':
-          socket.send(JSON.stringify({ type: 'SOURCE-ID', id: clientId }));
-          break;
-        // Sink connected -- send back its ID and notify src.
-        case 'SINK':
-          if (!!message.source && !!self.clients[message.source]) {
-            self.clients[message.source].send(JSON.stringify({
-              type: 'SINK-CONNECTED', sink: clientId }));
-
-            socket.send(JSON.stringify({ type: 'SINK-ID', id: clientId }));
-          } else {
-            util.prettyError('source invalid');
-          }
+        case 'PEER':
+          socket.send(JSON.stringify({ type: 'ID', id: clientId }));
           break;
         case 'LEAVE':
           if (!!self.clients[message.dst]) {

+ 4 - 1
package.json

@@ -7,7 +7,10 @@
     "test": "echo \"Error: no test specified\" && exit 1",
     "start": "node server.js"
   },
-  "repository": "",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/michellebu/peerjs-server.git"
+  },
   "author": "Michelle Bu",
   "license": "BSD",
   "dependencies": {