var WebSocket=require("..").Client,deflate=require("permessage-deflate"),fs=require("fs"),url=process.argv[2],proxy=process.argv[3],ca=fs.readFileSync(__dirname+"/../spec/server.crt"),tls={ca:ca},ws=new WebSocket(url,[],{proxy:{origin:proxy,headers:{"User-Agent":"Echo"},tls:tls},tls:tls,headers:{Origin:"http://faye.jcoglan.com"},extensions:[deflate]});ws.onopen=function(){console.log("[open]",ws.headers),ws.send("mic check")},ws.onclose=function(e){console.log("[close]",e.code,e.reason)},ws.onerror=function(e){console.log("[error]",e.message)},ws.onmessage=function(e){console.log("[message]",e.data)};