this.socketProtocol = "http-only";
/* override the websocket address if parameters are given */
- if(url != undefined) this.socketUrl = url;
- if(protocol != undefined) this.socketProtocol = protocol;
+ if(url !== undefined) this.socketUrl = url;
+ if(protocol !== undefined) this.socketProtocol = protocol;
this.VehicleMethodCall = function(id, name, successCB, errorCB)
{
this.start = function()
{
me.timeout = setTimeout(function(){
- if(me.errorCB != undefined)
+ if(me.errorCB !== undefined)
{
me.errorCB("\""+me.name+"\" method timed out after "+self.timeouttime+"ms");
}
}
this.finish = function()
{
- if(me.timeout != undefined)
+ if(me.timeout !== undefined)
{
clearTimeout(me.timeout);
}
{
if(!this.connected)
{
- if(errorCB != undefined)
+ if(errorCB !== undefined)
{
errorCB("\""+obj.name+"\" method failed because socket is closed");
}
return;
}
- if((event == undefined)||(event.type == undefined)||
- (event.name == undefined))
+ if((event === undefined)||(event.type === undefined)||
+ (event.name === undefined))
{
self.iErrorCB("BADLY FORMED MESSAGE: "+msg);
return;