public void ReceiveFromAsync_NotSupported()
{
using (Socket sock = new Socket(SocketType.Dgram, ProtocolType.Udp))
{
byte[] buf = new byte[1];
EndPoint ep = new IPEndPoint(IPAddress.Any, 0);
sock.Bind(ep);
SocketAsyncEventArgs args = new SocketAsyncEventArgs();
args.SetBuffer(buf, 0, buf.Length);
args.RemoteEndPoint = ep;
Assert.Throws<PlatformNotSupportedException>(() => sock.ReceiveFromAsync(args));
}
}
}