Use SendToAsync in another place

This commit is contained in:
Travis Nickles 2018-08-04 00:51:10 -05:00
parent 4c70b7a8f0
commit 8962e493bf

View File

@ -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) { }
}