From 921ad0ed2552f449e5b6ab7f31940a7aaab19ac1 Mon Sep 17 00:00:00 2001 From: Matthew Endsley Date: Thu, 17 Dec 2020 10:25:22 -0800 Subject: [PATCH] Add stub DTLS listener --- Hazel/Dtls/DtlsConnectionListener.cs | 36 ++++++++++++++++++++++++++++ Hazel/Hazel.csproj | 1 + 2 files changed, 37 insertions(+) create mode 100644 Hazel/Dtls/DtlsConnectionListener.cs diff --git a/Hazel/Dtls/DtlsConnectionListener.cs b/Hazel/Dtls/DtlsConnectionListener.cs new file mode 100644 index 0000000..dddc9ca --- /dev/null +++ b/Hazel/Dtls/DtlsConnectionListener.cs @@ -0,0 +1,36 @@ +using System.Net; +using Hazel.Udp.FewerThreads; + +namespace Hazel.Dtls +{ + /// + /// Listens for new UDP-DTLS connections and creates UdpConnections for them. + /// + /// + public class DtlsConnectionListener : ThreadLimitedUdpConnectionListener + { + /// + /// Create a new instance of the DTLS listener + /// + /// + /// + /// + /// + public DtlsConnectionListener(int numWorkers, IPEndPoint endPoint, ILogger logger, IPMode ipMode = IPMode.IPv4) + : base(numWorkers, endPoint, logger, ipMode) + { + } + + /// + protected override void ProcessIncomingMessageFromOtherThread(MessageReader message, EndPoint peerAddress, ConnectionId connectionId) + { + base.ProcessIncomingMessageFromOtherThread(message, peerAddress, connectionId); + } + + /// + protected override void QueueRawData(ByteSpan span, EndPoint remoteEndPoint) + { + base.QueueRawData(span, remoteEndPoint); + } + } +} diff --git a/Hazel/Hazel.csproj b/Hazel/Hazel.csproj index 9becc82..5f1d51e 100644 --- a/Hazel/Hazel.csproj +++ b/Hazel/Hazel.csproj @@ -79,6 +79,7 @@ + -- 2.39.5