Reputation: 103
I have IP address of a specific device which opens TCP listener. (But in documentation I can not find default port number.)
Is there any way to find which port number does the device open for connection ?
System.Net.Sockets.TcpClient client = new System.Net.Sockets.TcpClient(); client.Connect(ipAddress, port);
Upvotes: 0
Views: 777
Reputation: 236
Use a port scanner like https://www.heise.de/download/product/portscan-70308 to scan for open ports.
Upvotes: 2
Reputation: 2470
In a word, no.
Unless it is using a known protocol it could be anything between 1024 and 65535. There is no "default" unless it's officially been given a designation by the IANA.
Upvotes: 2