public MqttClientOptionsBuilder WithWebSocketServer(string uri) { _webSocketOptions = new MqttClientWebSocketOptions { Uri = uri }; return(this); }
public MqttClientOptionsBuilder WithWebSocketServer(string uri, IDictionary <string, string> headers = null) { _webSocketOptions = new MqttClientWebSocketOptions { Uri = uri, RequestHeaders = headers, }; return(this); }
public MqttClientOptionsBuilder WithWebSocketServer(string uri, MqttClientOptionsBuilderWebSocketParameters parameters = null) { _webSocketOptions = new MqttClientWebSocketOptions { Uri = uri, RequestHeaders = parameters?.RequestHeaders, CookieContainer = parameters?.CookieContainer }; return(this); }
public MqttClientOptionsBuilder WithWebSocketServer(Action <MqttClientWebSocketOptions> optionsBuilder) { if (optionsBuilder == null) { throw new ArgumentNullException(nameof(optionsBuilder)); } _webSocketOptions = new MqttClientWebSocketOptions(); optionsBuilder.Invoke(_webSocketOptions); return(this); }