Merge branch 'cast_receive' into dots
commit
806abb380f
|
@ -43,7 +43,7 @@ GameLib.API.Socket.Cast = function(
|
|||
);
|
||||
};
|
||||
|
||||
GameLib.API.Socket.Cast.prototype = Object.create(GameLib.Component.prototype);
|
||||
GameLib.API.Socket.Cast.prototype = Object.create(GameLib.API.Socket.prototype);
|
||||
GameLib.API.Socket.Cast.prototype.constructor = GameLib.API.Socket.Cast.Receive;
|
||||
|
||||
GameLib.API.Socket.Cast.CAST_TYPE_ROOM = 0x1;
|
||||
|
|
|
@ -43,13 +43,12 @@ GameLib.API.Socket.Receive = function(
|
|||
);
|
||||
};
|
||||
|
||||
GameLib.API.Socket.Receive.prototype = Object.create(GameLib.Component.prototype);
|
||||
GameLib.API.Socket.Receive.prototype = Object.create(GameLib.API.Socket.prototype);
|
||||
GameLib.API.Socket.Receive.prototype.constructor = GameLib.API.Socket.Receive;
|
||||
|
||||
GameLib.API.Socket.Receive.RECEIVE_TYPE_ROOM = 0x1;
|
||||
GameLib.API.Socket.Receive.RECEIVE_TYPE_PEER = 0x2;
|
||||
|
||||
|
||||
/**
|
||||
* Creates an API Socket.Receive from an Object Socket.Receive
|
||||
* @param socket GameLib.SocketsRuntime
|
||||
|
|
|
@ -37,11 +37,21 @@ GameLib.Socket = function(
|
|||
|
||||
this.connected = false;
|
||||
|
||||
var linkedObjects = {
|
||||
server : GameLib.Server
|
||||
};
|
||||
|
||||
if (this.socketType === GameLib.API.Socket.TYPE_CAST) {
|
||||
linkedObjects.source = GameLib.Component;
|
||||
}
|
||||
|
||||
if (this.socketType === GameLib.API.Socket.TYPE_RECEIVE) {
|
||||
linkedObjects.destination = GameLib.Component;
|
||||
}
|
||||
|
||||
GameLib.Component.call(
|
||||
this,
|
||||
{
|
||||
server : GameLib.Server
|
||||
}
|
||||
linkedObjects
|
||||
);
|
||||
|
||||
};
|
||||
|
|
|
@ -35,13 +35,6 @@ GameLib.Socket.Cast = function(
|
|||
socket,
|
||||
apiSocketCast
|
||||
);
|
||||
|
||||
GameLib.Component.call(
|
||||
this,
|
||||
{
|
||||
source : GameLib.Component
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
GameLib.Socket.Cast.prototype = Object.create(GameLib.API.Socket.Cast.prototype);
|
||||
|
|
|
@ -36,13 +36,6 @@ GameLib.Socket.Receive = function(
|
|||
apiSocketReceive
|
||||
);
|
||||
|
||||
GameLib.Component.call(
|
||||
this,
|
||||
{
|
||||
destination : GameLib.Component
|
||||
}
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
GameLib.Socket.Receive.prototype = Object.create(GameLib.API.Socket.Receive.prototype);
|
||||
|
|
Loading…
Reference in New Issue