hmlt5

» Using HTML5 and WebSockets

Starting at version 2.3.0 SmartFoxServer 2X provides support for HTML5 via WebSockets. If you are unfamiliar with this technology, WebSockets is a W3C standard for socket communication via native HTML5 applications, written in JavaScript. In conjunction with the latest web-browser technologies such as Canvas and WebGL this opens interesting opportunities to create sophisticated online games that don't require any specific browser plug-in.

» Preamble

WebSocket is an evolving project that is part of the new HTML5 set of standards for web communication. Since the specifications for this new protocol are still in the works, please consider our API to be in a Release Candidate state until a final draft is approved by the W3C committee.

From a purely client side perspective any application written for HTML5/WebSocket can be ported on any platform that runs an HTML5 compliant browser (e.g. computers with different OS, tablets and smartphones).

» Supported API features

The HTML5/JavaScript API provided with SmartFoxServer 2X covers all the standard API features, although some low level characteristics are not available. Below is a list of what is not supported or will be added later.

» Supported browsers

At the moment of writing this article (September 2012) we know that the following browsers support HTML5 and WebSockets correctly:

All the other internet browsers not mentioned here are likely to have partial or no support for WebSockets and therefore they won't work correctly.

» Documentation

In order to setup and use the HTML5/JavaScript API, please refer to the instructions on the Client API setup page.
Detailed jsDoc is also available here: the API classes and their methods/properties are fully described, together with usage examples.