From professional translators, enterprises, web pages and freely available translation repositories.
Если на вашем сервере уже реализована поддержка предыдущих версий протокола websocket, мы рекомендуем обновить ее до последней версии.
if you have server implementations for older versions of websocket protocol, we recommend you to upgrade it to the latest version.
Несмотря на это, можно воспользоваться упомянутыми выше библиотеками для реализации обратной совместимости в случаях, когда протокол websocket не поддерживается.
however, you can use websocket today with libraries that use one of the fallbacks mentioned above whenever websocket is not available.
На android стартует websocket сервер к которому коннектится js и слушает простейшие команды: вверх, вниз, влево, вправо.
as android application starts it launches websocket server. javascript application connects to it and listens for simple commands: up, down, left, right.
Для протокола websocket проблемой является совместимость с прокси-серверами – посредниками в http-соединениях в большинстве корпоративных сетей.
in the case of websocket it is the compatibility with proxy servers which mediate http connections in most company networks.
// when the connection is open, send some data to the server connection.onopen = function () { connection.send('ping'); // send the message 'ping' to the server }; // log errors connection.onerror = function (error) { console.log('websocket error ' + error); }; // log messages from the server connection.onmessage = function (e) { console.log('server: ' + e.data); };
// when the connection is open, send some data to the server connection.onopen = function () { connection.send('ping'); // send the message 'ping' to the server }; // log errors connection.onerror = function (error) { console.log('websocket error ' + error); }; // log messages from the server connection.onmessage = function (e) { console.log('server: ' + e.data); };