mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 01:03:01 +08:00
20 lines
429 B
C#
20 lines
429 B
C#
using System;
|
|
|
|
namespace MQTTnet.Core.Server
|
|
{
|
|
public static class SslEndpointOptionsExtensions
|
|
{
|
|
public static int GetPort(this DefaultEndpointOptions options)
|
|
{
|
|
if (options == null) throw new ArgumentNullException(nameof(options));
|
|
|
|
if (!options.Port.HasValue)
|
|
{
|
|
return 1883;
|
|
}
|
|
|
|
return options.Port.Value;
|
|
}
|
|
}
|
|
}
|