diff options
-rw-r--r-- | flash-src/WebSocket.as | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/flash-src/WebSocket.as b/flash-src/WebSocket.as index 04d7f05..5b32b76 100644 --- a/flash-src/WebSocket.as +++ b/flash-src/WebSocket.as @@ -65,7 +65,8 @@ public class WebSocket extends EventDispatcher { if (!m) fatal("SYNTAX_ERR: invalid url: " + url); this.scheme = m[1]; this.host = m[2]; - this.port = parseInt(m[4] || "80"); + var defaultPort:int = scheme == "wss" ? 443 : 80; + this.port = parseInt(m[4]) || defaultPort; this.path = (m[5] || "/") + (m[6] || ""); this.origin = origin; this.protocol = protocol; |