Replies: 1 comment 1 reply
-
It's not really needed on a server. I assume that's why they're deprecating it. Typically you would listen on 127.0.0.1, 0.0.0.0, *, or the actual IP address of an interface. Cheers, Joel |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be good to have an override function for server to start that takes port only, like most libraries provide.
Alternatively can you suggest an solution how I find that ip from application level (pragmatically) and pass it to that function.
I was exploring the TcpListener class it provides an overload that takes port only
`
using System.Threading.Tasks;
namespace System.Net.Sockets
{
public class TcpListener
{
[Obsolete("This method has been deprecated. Please use TcpListener(IPAddress localaddr, int port) instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public TcpListener(int port);
public TcpListener(IPEndPoint localEP);
public TcpListener(IPAddress localaddr, int port);
public bool ExclusiveAddressUse { get; set; }
public EndPoint LocalEndpoint { get; }
public Socket Server { get; }
protected bool Active { get; }
}
}
`
can we use it until its not removed
Beta Was this translation helpful? Give feedback.
All reactions