I use in vb (VS2005)
Server = New TcpListener(PortNumber)
Which is simple and straightforward. But I get
Public Sub New(port As Integer) is obsolete: This method has been
deprecated. Please use TcpListener(IPAddress localaddr, int port) instead.
It also gives a link that returns "page not found."
If I use the new constructor, what values do I give it so that it behaves
the same as the old constructor?
I guess the port number would be the same, but what in the world should I
put as the IPAddress?
The scenario is this: First I deploy the app as a service on my development
machine and put the TCP communications through its paces, from apps on my
machine and other machines.
Next I uninstall it from my machine and install it on a test server, and put
it through the same tests.
Finally, I uninstall it from the test server and install it on the
production server. etc.
This should all work without changing any code in the program or the
contents of any files it reads, and without recompiling the program.
I can do this with the "obsolete" constructor. What do I use for IPAddress
so it works the same way with the new constructor?