Can the Telnet class be enhanced so that it accepts a port number other than default 23?
The port number need not be 23, but any port in which the telnet server is running. The TelnetSession class has a method connect( String host, int port ) that allows you to establish a telnet session with the host and port that you specify provided the telnet server is running in the specified port.