   
   private var logger:IWebSocketLogger;
   private var base64Encoder:Base64Encoder = new Base64Encoder();
+
+  private var useFlashSecureSocket:Boolean = false;
   
   public function WebSocket(
       id:int, url:String, protocols:Array, origin:String,
       proxyHost:String, proxyPort:int,
       cookie:String, headers:String,
-      logger:IWebSocketLogger) {
+      logger:IWebSocketLogger,
+      useFlashSecureSocket:Boolean = false) {
     this.logger = logger;
     this.id = id;
     this.url = url;

    this.origin = origin;
    this.requestedProtocols = protocols;
    this.cookie = cookie;
    // if present and not the empty string, headers MUST end with \r\n
    // headers should be zero or more complete lines, for example
    // "Header1: xxx\r\nHeader2: yyyy\r\n"

  private var tlsSocket:TLSSocket;
  private var tlsConfig:TLSConfig;
  private var socket:Socket;
  private var secureSocket:SecureSocket;
  
  private var acceptedProtocol:String;
  private var expectedDigest:String;
