mirror of
https://github.com/fergalmoran/dss.git
synced 2025-12-22 17:48:51 +00:00
33 lines
895 B
JavaScript
33 lines
895 B
JavaScript
// Generated by CoffeeScript 1.3.3
|
|
(function() {
|
|
|
|
define(['socket.io'], function(SocketIO) {
|
|
var RealtimeController;
|
|
RealtimeController = (function() {
|
|
|
|
function RealtimeController() {}
|
|
|
|
RealtimeController.prototype.startSocketIO = function() {
|
|
var _this = this;
|
|
console.log("RealtimeController: Socket IO starting");
|
|
this.socket = SocketIO.connect(com.podnoms.settings.REALTIME_HOST);
|
|
return this.socket.on("news", function(data) {
|
|
console.log("RealtimeController: Connected");
|
|
return _this.socket.emit("dss:connected", {
|
|
my: "data"
|
|
});
|
|
});
|
|
};
|
|
|
|
RealtimeController.prototype.sendMessage = function(message) {
|
|
return console.log("RealtimeController: sendMessage");
|
|
};
|
|
|
|
return RealtimeController;
|
|
|
|
})();
|
|
return RealtimeController;
|
|
});
|
|
|
|
}).call(this);
|