mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
17 lines
No EOL
509 B
JavaScript
17 lines
No EOL
509 B
JavaScript
/* module make possible connectoin thrue socket.io on a client */
|
|
var CloudCommander, io;
|
|
(function(){
|
|
"use strict";
|
|
var Util = CloudCommander.Util;
|
|
|
|
Util.jsload("http://localhost:31337/socket.io/lib/socket.io.js", function(){
|
|
var socket = io.connect('http://localhost:31337/');
|
|
socket.on('connect', function () {
|
|
socket.send('hi');
|
|
|
|
socket.on('message', function (msg) {
|
|
console.log(msg);
|
|
});
|
|
});
|
|
});
|
|
})(); |