I would like to pass a custom parameter to the ReceiveCompleted event handler via the ReceiveCompletedEventArgs object. I don't want a timeout, but it seems as though there is no constructor (other than BeginReceive()) that doesn't expect a timeout value. Is there any workaround for this?
Asked
Active
Viewed 96 times
0
-
Please show your progress so far. Thank you – tom redfern Dec 07 '18 at 21:53
-
Note you can simplify your life by using TaskFactoty.FromAsync https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskfactory.fromasync?view=netframework-4.7.2 to adapt the old async API into the new Task-based async with first-class language support. https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/await-operator – David Browne - Microsoft Dec 09 '18 at 18:53