Beispiel #1
0
        public MqttClientOptionsBuilder WithProxy(Action <MqttClientWebSocketProxyOptions> optionsBuilder)
        {
            if (optionsBuilder == null)
            {
                throw new ArgumentNullException(nameof(optionsBuilder));
            }

            _proxyOptions = new MqttClientWebSocketProxyOptions();
            optionsBuilder(_proxyOptions);
            return(this);
        }
Beispiel #2
0
        public MqttClientOptionsBuilder WithProxy(string address, string username = null, string password = null, string domain = null, bool bypassOnLocal = false, string[] bypassList = null)
        {
            _proxyOptions = new MqttClientWebSocketProxyOptions
            {
                Address       = address,
                Username      = username,
                Password      = password,
                Domain        = domain,
                BypassOnLocal = bypassOnLocal,
                BypassList    = bypassList
            };

            return(this);
        }