Fixed bug where not specifying a port in the XSocket URI causes an error -- Windows XP returns -1 as default port value for WSS & WS in the Uri object.
Moved wss connection checks to use extension menthod.