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