PowerTCP Telnet for .NET

from $349.00
Available Platforms

See all PowerTCP Telnet for .NET Code Examples

Automated Session Example

The following example demonstrates an automated Telnet session, with the returned data written to console.


Telnet telnet1 = new Telnet();
telnet1.Login(new Credentials("myUsername", "myPassword", "$");

//Send a list command
telnet1.Write("ls -la\r");

//Read until prompt, write to console
string listing = telnet1.ReadToDelimiter("$");

//Send an exit command; server will close the connection
//Read any remaining data before the shutdown and write to console


To download a trial please visit the PowerTCP Telnet for .NET product page.