Login  
Search All Forums
Dart Home | PowerTCP Emulation for .NET | Custom Development Reply | PowerTCP Emulation for .NET Topics | Forums   
AuthorForum: PowerTCP Emulation for .NET
Topic: Interactive with external telnet
Suudy

From: Pullman, WA USA
Posts: 3
Member Since: 11/30/04
posted November 30, 2004 12:25 PM

We are using a custom protocol for communications, but would like to use the terminal emulation component. The examples show using internal and external telnet. We can't use the internal because of our custom protocol. And the external assumes a non-interactive telnet session.

I thought I could create my own "telnet" class that uses our custom protocol, and just tie it to the vt component. However there is no docs on what methods and properties my class would have to expose.

Is there a way to interactive with an external telnet?

Thanks,
Pete
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted November 30, 2004 12:44 PM

Please explain what you mean by "And the external assumes a non-interactive telnet session"

As far as I can tell that is incorrect. The external and internal samples differ only in that the external sample contains a Telnet control that does the communication.
Suudy

From: Pullman, WA USA
Posts: 3
Member Since: 11/30/04
posted November 30, 2004 12:49 PM

I meant the example assumes non-interactive.

What I want is a fully interactive terminal. If a user types, I want to transmit what they type. How do I get what they typed without it automatically going to the attached telnet client?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted November 30, 2004 1:48 PM

I'm still not sure what you mean. In fact the exact opposite is true. Let me walk you through it:

The connection is established in the mnuFileConnect_Click. After the connection is established, BeginReceive is called.

At this point if any data is received telnet1_EndReceive will fire. The received data is then written to the VT and BeginReceive is called again.

If the user types in the VT, the vt1_KeyDown and vt1_KeyPress events will fire. That is where the keypress gets sent by the Telnet control. vt1_KeyDown fires first and is used to change or "remap" the keypress to a different string.

If the system you are using echoes, then the EndReceive will fire and display your keystrokes. If the system does not support echo then you should write the keystrokes to the VT in addition to sending them via Telnet.

Does this help at all?
Suudy

From: Pullman, WA USA
Posts: 3
Member Since: 11/30/04
posted November 30, 2004 2:07 PM

To some degree. However, we use a custome communications protocol and cannot use the telnet component. So the BeginReceive and EndReceive are not relavent.

If I use the KeyDown or KeyPress events, I have to do the mapping myself (I might as well use a text box). If I don't handle the events myself, it goes to the telnet component.

Are you suggesting that all I need to provide is BeginReceive and EndReceive methods and attach my own class?

Just to make things more clear, let me describe what I'm trying to do. I am creating an application that provides a transparent telnet-like connection, but the connection is done using a custom protocol on top of TCP/IP. The idea is that the connection is opened (via the mnuFileConnect_Click event). Once open, all data typed in the vt is transmitted using this custom protocol. Any return data is received via the custom protocol and displayed on the vt.

We need terminal emulation because it is like telnet. For example, if I wanted to create an SSH client using the emulation control, how would you suggest going about it? Creating a class that mimics the telnet class? Or handling the KeyDown and KeyPress events?

Pete
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted November 30, 2004 2:30 PM

I think that doing this on the forum is just confusing things. Please call in to discuss this. We can be reached at 315-790-5456.
Reply | PowerTCP Emulation for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX