Use SendToAsync in another place

This commit is contained in:
Travis Nickles 2018-08-04 00:48:28 -05:00
parent 57af817c00
commit c3b4190b02

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