mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-23 01:39:17 +01:00
parent
f7bffb2f2f
commit
3353b803c3
@ -177,6 +177,7 @@ namespace DS4Windows
|
||||
SocketAsyncEventArgs args = new SocketAsyncEventArgs();
|
||||
args.RemoteEndPoint = clientEP;
|
||||
args.SetBuffer(packetData, 0, packetData.Length);
|
||||
args.Completed += ClearSentData;
|
||||
try { udpSock.SendToAsync(args); }
|
||||
catch (Exception e) { }
|
||||
}
|
||||
@ -634,6 +635,7 @@ namespace DS4Windows
|
||||
SocketAsyncEventArgs args = new SocketAsyncEventArgs();
|
||||
args.RemoteEndPoint = cl;
|
||||
args.SetBuffer(outputData, 0, outputData.Length);
|
||||
args.Completed += ClearSentData;
|
||||
try { udpSock.SendToAsync(args); }
|
||||
catch (SocketException ex) { }
|
||||
}
|
||||
@ -642,5 +644,11 @@ namespace DS4Windows
|
||||
clientsList.Clear();
|
||||
clientsList = null;
|
||||
}
|
||||
|
||||
private void ClearSentData(object sender, SocketAsyncEventArgs args)
|
||||
{
|
||||
args.Dispose();
|
||||
args = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user