Socket programming
-
Writing C# program to search through network for existing listening server's ip addresses and port numbers assuming that ip address and port number for the server was not known.
-
Writing C# program to search through network for existing listening server's ip addresses and port numbers assuming that ip address and port number for the server was not known.
-
Writing C# program to search through network for existing listening server's ip addresses and port numbers assuming that ip address and port number for the server was not known.
system.net namespace will be helpful for you you can use tcpclient and tcplistner class for your purpose tips: also use socket,networkstream classes
-
Writing C# program to search through network for existing listening server's ip addresses and port numbers assuming that ip address and port number for the server was not known.
General idea...
bool success;
//Iterate through every possible LAN IP address...
//Iterate through every possible Port...
try
{
// attempt to connect TCP
success = true;
break;
}
catch
{
// not valid
}
try
{
// attempt to connect UDP
success = true;
break;
}
catch
{
// not valid
}
if(success) break;
//
//NB: This will take forever to run unless you're VERY lucky!
Dave
-
Writing C# program to search through network for existing listening server's ip addresses and port numbers assuming that ip address and port number for the server was not known.
Search all the web for servers? of what kind? what is your goal?