package hw.connect; import protohx.Message; class ConnectionFactory { public static function buildClientConnection(host: String, port:Int, inputFactory:Class):IConnection { #if flash return new hw.connect.flash.FlashConnection(host, port, inputFactory); #elseif html5 return new hw.connect.js.JsConnection(host, port + (hw.connect.js.JsConnection.isSecured() ? 1 : 0), inputFactory); #else return new hw.connect.desktop.DesktopConnection(host, port, inputFactory); #end } }