Hi
We are using VC 2.3 for VS 2015. We have a Windows Forms application that uses HttpClient, etc, to send and receive SOAP messages.
But I read from Microsoft:
"HttpClient is intended to be instantiated once and re-used throughout the life of an application. Instantiating an HttpClient class for every request will exhaust the number of sockets available under heavy loads. This will result in SocketException errors. Below is an example using HttpClient correctly."
C#
publicclassGoodController : ApiController
{
// OKprivatestaticreadonly HttpClient HttpClient;
staticGoodController()
{
HttpClient = new HttpClient();
}
}
So can somebody convert the above code to Visual Cobol please? The application consists of a main Form that calls other Forms and classes, all in separate projects. Should we just instantiate the class at the main Form and reference it in the necessary projects?
Thank you
Brendan