From: Matthew Endsley Date: Thu, 17 Dec 2020 18:25:22 +0000 (-0800) Subject: Add stub DTLS listener X-Git-Tag: 1.0.0~20^2~19^2~1 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=921ad0ed2552f449e5b6ab7f31940a7aaab19ac1;p=rhonda%2Fimpostor.hazel.git Add stub DTLS listener --- 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 @@ +