honor configuration parameter request.webSocketUrl

Checks if request.webSocketUrl has been configured (like described in documentation) and use this one if exists instead of request.url. This patch is for the non-jquery version only.