浏览代码

remnants of old api

Michelle Bu 12 年之前
父节点
当前提交
200be3eee7
共有 4 个文件被更改,包括 4 次插入4 次删除
  1. 2 2
      dist/peer.js
  2. 0 0
      dist/peer.min.js
  3. 1 1
      lib/connection.js
  4. 1 1
      lib/socket.js

+ 2 - 2
dist/peer.js

@@ -1376,7 +1376,7 @@ exports.Peer = Peer;
  * A DataChannel|PeerConnection between two Peers.
  */
 function DataConnection(id, peer, socket, options) {
-  if (!(this instanceof DataConnection)) return new DataConnection(options);
+  if (!(this instanceof DataConnection)) return new DataConnection(id, peer, socket, options);
   EventEmitter.call(this);
 
   options = util.extend({
@@ -1751,7 +1751,7 @@ DataConnection.prototype.handlePort = function(message) {
  * possible connection for peers.
  */
 function Socket(host, port, key, id) {
-  if (!(this instanceof Socket)) return new Socket(server, id, key);
+  if (!(this instanceof Socket)) return new Socket(host, port, key, id);
   EventEmitter.call(this);
   
   this._id = id;

文件差异内容过多而无法显示
+ 0 - 0
dist/peer.min.js


+ 1 - 1
lib/connection.js

@@ -2,7 +2,7 @@
  * A DataChannel|PeerConnection between two Peers.
  */
 function DataConnection(id, peer, socket, options) {
-  if (!(this instanceof DataConnection)) return new DataConnection(options);
+  if (!(this instanceof DataConnection)) return new DataConnection(id, peer, socket, options);
   EventEmitter.call(this);
 
   options = util.extend({

+ 1 - 1
lib/socket.js

@@ -3,7 +3,7 @@
  * possible connection for peers.
  */
 function Socket(host, port, key, id) {
-  if (!(this instanceof Socket)) return new Socket(server, id, key);
+  if (!(this instanceof Socket)) return new Socket(host, port, key, id);
   EventEmitter.call(this);
   
   this._id = id;

部分文件因为文件数量过多而无法显示