"use strict";var Base=require("./driver/base"),Client=require("./driver/client"),Server=require("./driver/server"),Driver={client:function(e,r){return void 0===(r=r||{}).masking&&(r.masking=!0),new Client(e,r)},server:function(e){return void 0===(e=e||{}).requireMasking&&(e.requireMasking=!0),new Server(e)},http:function(){return Server.http.apply(Server,arguments)},isSecureRequest:function(e){return Server.isSecureRequest(e)},isWebSocket:function(e){if("GET"!==e.method)return!1;var r=e.headers.connection||"",i=e.headers.upgrade||"";return"GET"===e.method&&r.toLowerCase().split(/ *, */).indexOf("upgrade")>=0&&"websocket"===i.toLowerCase()},validateOptions:function(e,r){Base.validateOptions(e,r)}};module.exports=Driver;