Very simple Telnet server written in C#. You can add your own commands and enable password control for connecting to the telnet server.
- Very simple, can be used with only two lines of codes
- Supports multiple client connections at the same time
- Supports password protection
- Customizable Telnet prompt
- Built in help and exit commands
- You can add your own commands only by implementing a simple command interface
- The simplest way
//Create the TelnetService object
TelnetService _telnetService = new TelnetService(new TCPServer(), new ITelnetCommand[0]);
//Start with default settings
_telnetService.Start(new TelnetServiceSettings());
- Start with custom settings
TelnetService _telnetService = new TelnetService(new TCPServer(), new ITelnetCommand[0]);
TelnetServiceSettings _telnetSettings = new TelnetServiceSettings();
_telnetSettings.PromtText = "SampleApp@" + Environment.MachineName;
_telnetSettings.PortNumber = 32202;
_telnetSettings.Charset = Encoding.Default.CodePage;
//Other settings..
_telnetService.Start(_telnetSettings);
- Add custom commands
You can pass your custom commands to the TelnetService as a constructor parameter
TelnetService _telnetService = new TelnetService(new TCPServer(),
new ITelnetCommand[]
{
new HelloCommand(),
new EchoCommand()
});
- Help command usage
- Custom command usage with no parameters and one parameter