mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 02:13:00 +08:00
Merge branch 'develop' into feature/MQTTv5
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
|
||||
namespace MQTTnet.Client
|
||||
{
|
||||
public class MqttClientOptionsBuilderWebSocketParameters
|
||||
{
|
||||
public IDictionary<string, string> RequestHeaders { get; set; }
|
||||
|
||||
public CookieContainer CookieContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -141,11 +141,13 @@ namespace MQTTnet.Client.Options
|
||||
return this;
|
||||
}
|
||||
|
||||
public MqttClientOptionsBuilder WithWebSocketServer(string uri)
|
||||
public MqttClientOptionsBuilder WithWebSocketServer(string uri, MqttClientOptionsBuilderWebSocketParameters parameters = null)
|
||||
{
|
||||
_webSocketOptions = new MqttClientWebSocketOptions
|
||||
{
|
||||
Uri = uri
|
||||
Uri = uri,
|
||||
RequestHeaders = parameters?.RequestHeaders,
|
||||
CookieContainer = parameters?.CookieContainer
|
||||
};
|
||||
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user