AnsiPlayer - GUI telnet session player

Replays saved Telnet terminal sessions recorded using TerminalControl or VirtualTerminal components.

The core of this sample is the AnsiPlayerShellChannel class which implements the IShellChannel and IShellChannelFactory interfaces that interpret the recorded sessions and provide the saved communication to the TerminalControl object.

Check out the Recording communication tutorial and Windows Forms Telnet client sample for information on recording your sessions.

This sample demonstrates:

  • Using the TerminalControl class.
  • Implementing a custom IShellChannel and IShellChannelFactory interfaces.
  • Binding the TerminalControl class to your own IShellChannelFactory interfaces.
  • Handling the Disconnected event.
  • Handling the RemoteResize event.
  • Resizing the terminal screen.

Sample files are included in the project.


// open the input file for reading
Stream inputStream = File.OpenRead("recorded_ANSI_file.ans");

// create a new AnsiPlayerShellChannel
AnsiPlayerShellChannel player = new AnsiPlayerShellChannel(inputStream);

// bind created AnsiPlayerShellChannel to the TerminalControl object


' open the input file for reading
Dim inputStream As Stream = File.OpenRead("recorded_ANSI_file.ans")

' create a new AnsiPlayerShellChannel
Dim player As AnsiPlayerShellChannel = New AnsiPlayerShellChannel(inputStream)

' bind created AnsiPlayerShellChannel to the TerminalControl object