/var/www/doncode.com.ua/www/public/js
NameSizeModeActions
counter/-0755rm
images/-0755rm
slick/-0755rm
bootstrap.js675890644editdlrm
bootstrap.min.js370450644editdlrm
call_count.php3620644editdlrm
client_app.js51350644editdlrm
color_prettify.js18230644editdlrm
Control.Geocoder.js182360644editdlrm
datepicker_ru.js10100644editdlrm
device.min.js26050644editdlrm
EasePack.min.js52110666editdlrm
html5imageupload.js348060644editdlrm
jquery-1.11.2.min.js959310644editdlrm
jquery-ui.min.js2404270644editdlrm
jquery.cookie.js17260644editdlrm
jquery.maskedinput.min.js42740644editdlrm
jquery.min.js38400644editdlrm
jquery.paginator.src.js93780644editdlrm
leaflet-routing-machine.js627690644editdlrm
leaflet-routing-machine.min.js382080644editdlrm
leaflet.js1254100644editdlrm
leaflet.label.js83640644editdlrm
md5.js122950644editdlrm
modern.js92010644editdlrm
osrm.dev.js2142600644editdlrm
osrm.min.js556740644editdlrm
osrm.printing.dev.js3040360644editdlrm
osrm.priting.min.js460550644editdlrm
prettify.js136310644editdlrm
space.js57490666editdlrm
space2.js29530666editdlrm
swfobject.js102200644editdlrm
template.js190930644editdlrm
TweenLite.min.js251670666editdlrm
typeahead.js714170644editdlrm
web_socket.js129610644editdlrm
web_socket_use.js29170644editdlrm
Edit: /var/www/doncode.com.ua/www/public/js/web_socket_use.js (2917B)
// Set URL of your WebSocketMain.swf here: WEB_SOCKET_SWF_LOCATION = "/public/swf/WebSocketMain.swf"; WEB_SOCKET_SWF_LOCATION = "/public/swf/WebSocketMainInsecure.swf"; // Set this to dump debug message from Flash to console.log: WEB_SOCKET_DEBUG = false; // Everything below is the same as using standard WebSocket. var ws; var autoreconnect = true; var pingInterval = 0; var server_host = 'api.doncode.com.ua'; //var server_host = '192.168.0.243'; var taxi_server_mob_port = 7580; var sid = ''; function sendPing(){ //output('TX: {"c":"lastgps"}'); ws.send('[{"cmd":"ping"}]\n'); } function sendGetCars(){ //output('TX: {"c":"lastgps"}'); ws.send('[{"cmd":"get_cars"}]\n'); } function sendGetOnline(){ //output('TX: {"c":"lastgps"}'); ws.send('[{"cmd":"get_online"}]\n'); } function sendChat(message){ //output('TX: {"c":"lastgps"}'); ws.send('[{"cmd":"chat","text":"'+message+'"}]\n'); } function web_socket_init(sessid) { sid = sessid; if(!autoreconnect){ output("autoreconnect disable") return; } autoreconnect = true; // Connect to Web Socket. // Change host/port here to your own Web Socket server. //host = document.getElementById('host').value; output("Connecting to "+'ws://'+server_host+':'+taxi_server_mob_port+"..."); ws = new WebSocket('ws://'+server_host+':'+taxi_server_mob_port); // Set event handlers. ws.onopen = function() { output("onopen"); ws.send('[{"cmd":"auth","sid":"'+sid+'"}]'); pingInterval = setInterval("sendPing()", 30000); if (typeof(callback_onopen) == "function") { console.log('RUN CALLBACK: callback_onopen'); callback_onopen(); } }; ws.onmessage = function(e) { // e.data contains received string. output("onmessage: " + e.data); j = JSON.parse(e.data); if (typeof(callback_onmessage) == "function") { console.log('RUN CALLBACK: callback_onmessage'); callback_onmessage(j); } //if(j.err == undefined){ // draw_marker(j); //} }; ws.onclose = function() { output("onclose "); clearInterval(pingInterval); if(autoreconnect){ setTimeout("web_socket_init('"+sid+"')",5000); } if (typeof(callback_onclose) == "function") { console.log('RUN CALLBACK: callback_onclose'); callback_onclose(); } ws.close; }; ws.onerror = function() { output("onerror"); clearInterval(pingInterval); if(autoreconnect){ //setTimeout("web_socket_init()",15000); } if (typeof(callback_onerror) == "function") { console.log('RUN CALLBACK: callback_onerror'); callback_onerror(); } ws.close; }; } function onSubmit() { var input = document.getElementById("input"); // You can send message to the Web Socket using ws.send. ws.send(input.value); output("send: " + input.value); input.value = ""; input.focus(); } function onCloseClick() { ws.close(); autoreconnect = false; } function output(str) { console.log(str); }