39 lines
425 B
JavaScript
39 lines
425 B
JavaScript
|
/**
|
||
|
* The Client class
|
||
|
*
|
||
|
* @public
|
||
|
*/
|
||
|
|
||
|
function Client() {
|
||
|
|
||
|
/**
|
||
|
* Self references.
|
||
|
*
|
||
|
* @private
|
||
|
*/
|
||
|
|
||
|
var self = this;
|
||
|
|
||
|
/**
|
||
|
* The active socket.
|
||
|
*
|
||
|
* @private
|
||
|
*/
|
||
|
|
||
|
var socket = io.connect("")
|
||
|
.on("init", function(data) { self.init(data); });
|
||
|
|
||
|
/**
|
||
|
* Setup new socket connections.
|
||
|
*
|
||
|
* @param {String} data
|
||
|
* @public
|
||
|
*/
|
||
|
|
||
|
this.init = function(data) {
|
||
|
// Debug
|
||
|
console.log(data);
|
||
|
};
|
||
|
|
||
|
};
|