Observable.FromAsyncPattern with UDPClient.EndReceive and ref remote endpoint Parameter
问题 I'm learning about Reactive extensions and trying to re-factor some of my code. UDPClient.EndReceive takes a ref IPEndPoint parameter, so I currently have this working: UdpClient receiverUDP = new UdpClient(); receiverUDP.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); receiverUDP.EnableBroadcast = true; receiverUDP.Client.ExclusiveAddressUse = false; receiverUDP.Client.Bind(new IPEndPoint(IPAddress.Any, 1234)); IPEndPoint ep = null; var async =