mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
remove unused file
This commit is contained in:
parent
ca3275757b
commit
55c6a5aa27
35
js/socket.js
35
js/socket.js
@ -1,35 +0,0 @@
|
|||||||
/* exported Log */
|
|
||||||
|
|
||||||
/* Magic Mirror
|
|
||||||
* Socket Connection
|
|
||||||
*
|
|
||||||
* By Michael Teeuw http://michaelteeuw.nl
|
|
||||||
* MIT Licensed.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var MMSocket = function(moduleName) {
|
|
||||||
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
if (typeof moduleName !== "string") {
|
|
||||||
throw new Error("Please set the module name for the MMSocket.");
|
|
||||||
}
|
|
||||||
|
|
||||||
self.moduleName = moduleName;
|
|
||||||
|
|
||||||
self.socket = io("http://localhost:8080");
|
|
||||||
self.socket.on("notification", function(data) {
|
|
||||||
MM.sendNotification(data.notification, data.payload, Socket);
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
|
||||||
sendMessage: function(notification, payload, sender) {
|
|
||||||
Log.log("Send socket message: " + notification);
|
|
||||||
self.socket.emit("notification", {
|
|
||||||
notification: notification,
|
|
||||||
sender: sender,
|
|
||||||
payload: payload
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
Loading…
x
Reference in New Issue
Block a user