Hi Danny,
In communication between Mobile server and Web client(s) Web Sockets are used only for transmission of Video.
Web Sockets support is built-in into the Milestone Mobile SDK.
And by default it is turned On.
It is NOT used only if the client browser is too old (most of modern browsers support it since 2012) or if the mobile server is installed on OS earlier than Windows 8 (7 or 2008 server)).
In addition you could control manually if the web sockets are used or not (in case when both browser and server do support them of course).
In order to turn them ON you could call:
XPMobileSDK.toggleWebSocket(true);
If you want to disable them, just call:
XPMobileSDK.toggleWebSocket(false);
Good place of this call is after login method and the setting is kept per session (not persisted).
P.S.
Please bear in mind that Web Socket implementation differs between browsers (and versions). You could experience very strange situations where if you’ve started few web socket connections (eg video streams), browser ‘favoritize’ one of them and gives it high bandwidth, meanwhile making others to suffer.
(In short most of the browsers are not very good in network balancing between different simultaneous web socket connections.)
In result one of the video streams could have significantly better FPS than others.
We try to detect such situation in the SDK and perform some actions to control them, but is not always possible and successful.
Therefore we left the option in the Milestone Web Client - for some customers performance is just better on AJAX (Web Sockets turned off).