From 6475fa0c377f896c8f36c71e84b22c99f7b78693 Mon Sep 17 00:00:00 2001 From: Michelle Bu Date: Sun, 20 Jan 2013 15:46:01 -0800 Subject: [PATCH] SOURCE -> PEER --- lib/server.js | 15 ++------------- package.json | 5 ++++- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/lib/server.js b/lib/server.js index f06e9f3..585a935 100644 --- a/lib/server.js +++ b/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]) { diff --git a/package.json b/package.json index bae62b9..5a8825e 100644 --- a/package.json +++ b/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": {