From c3b4190b0285adb03b5a9adbe201508bf1c2b399 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 4 Aug 2018 00:48:28 -0500 Subject: [PATCH] Use SendToAsync in another place --- DS4Windows/DS4Control/UdpServer.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DS4Windows/DS4Control/UdpServer.cs b/DS4Windows/DS4Control/UdpServer.cs index 224f129..04f1074 100644 --- a/DS4Windows/DS4Control/UdpServer.cs +++ b/DS4Windows/DS4Control/UdpServer.cs @@ -173,7 +173,11 @@ namespace DS4Windows Array.Copy(usefulData, 0, packetData, currIdx, usefulData.Length); FinishPacket(packetData); - try { udpSock.SendTo(packetData, clientEP); } + //try { udpSock.SendTo(packetData, clientEP); } + SocketAsyncEventArgs args = new SocketAsyncEventArgs(); + args.RemoteEndPoint = clientEP; + args.SetBuffer(packetData, 0, packetData.Length); + try { udpSock.SendToAsync(args); } catch (Exception e) { } }