Closed
Description
We should change all the old IAsyncResult APIs in System.Net.Sockets to simply wrap the equivalent Task APIs, as we do in general.
Unfortunately, some of the current Task APIs actually use these IAsyncResult APIs. There is planned work to change this.
Specifically, we should do this for the following Socket APIs:
- [Begin/End]Connect -- done in Rewrite Socket.ConnectAsync for DNS with async/await #43661
- [Begin/End]Accept -- done in refactor old APM [Begin/End]Accept methods on top of Task APIs, and enable for Unix as well #51212
- [Begin/End]Send -- done in Reimplement Socket.Begin/EndSend/Receive on Send/ReceiveAsync #43886
- [Begin/End]Receive -- done in Reimplement Socket.Begin/EndSend/Receive on Send/ReceiveAsync #43886
- [Begin/End]SendTo -- blocked on Sockets: Reimplement remaining Task-based async methods using SocketAsyncEventArgs #41502
- [Begin/End]ReceiveFrom -- blocked on Sockets: Reimplement remaining Task-based async methods using SocketAsyncEventArgs #41502
- [Begin/End]ReceiveMessageFrom -- blocked on Sockets: Reimplement remaining Task-based async methods using SocketAsyncEventArgs #41502
- [Begin/End]SendFile -- blocked on Add Task-based async API for Socket.SendFile #42591
- [Begin/End]Disconnect -- done in add Task-based DisconnectAsync and refactor APM methods on top of it #51213
And these UdpClient APIs:
- [ ] [Begin/End]Send
- [ ] [Begin/End]Receive
EDIT (by @antonfirsov )
As per #43845 (comment), we don't need to do anything with UdpClient.