From 695d9b3e31774ccefa4f05a8007d003943fe4647 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Mon, 11 Mar 2019 12:48:16 -0500 Subject: [PATCH] Raise SocketAsyncEventArgs buffer for UDP server Related to issue #602 --- DS4Windows/DS4Control/UdpServer.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DS4Windows/DS4Control/UdpServer.cs b/DS4Windows/DS4Control/UdpServer.cs index 76ad2aa..4a8ef4c 100644 --- a/DS4Windows/DS4Control/UdpServer.cs +++ b/DS4Windows/DS4Control/UdpServer.cs @@ -81,8 +81,8 @@ namespace DS4Windows public UdpServer(GetPadDetail getPadDetailDel) { portInfoGet = getPadDetailDel; - argsList = new SocketAsyncEventArgs[20]; - for (int num = 0; num <= 19; num++) + argsList = new SocketAsyncEventArgs[40]; + for (int num = 0; num < 40; num++) { SocketAsyncEventArgs args = new SocketAsyncEventArgs(); args.SetBuffer(new byte[100], 0, 100); @@ -188,7 +188,7 @@ namespace DS4Windows int temp = 0; poolLock.EnterWriteLock(); temp = listInd; - listInd = ++listInd % 20; + listInd = ++listInd % 40; SocketAsyncEventArgs args = argsList[temp]; poolLock.ExitWriteLock(); @@ -654,7 +654,7 @@ namespace DS4Windows int temp = 0; poolLock.EnterWriteLock(); temp = listInd; - listInd = ++listInd % 20; + listInd = ++listInd % 40; SocketAsyncEventArgs args = argsList[temp]; poolLock.ExitWriteLock();