You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
391 B

2 years ago
'use strict';
function socketConnect(project = settings.project, name = "noone"){
$.get('/php/get_nodejs_port.php', port => {
let urlQueries = '?game=' + project.name + '&name=' + name;
let url = 'https://' + location.hostname + ":" + port + urlQueries;
socket = io.connect(url);
socket.on('connect', () => console.log('Connected to ', url));
});
}