471,570 Members | 935 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 software developers and data experts.

Sending ctrl + c to telnet app in C#

hello all, I have a c# app that telnets into a router and issues a
series of commands. All works great except I haven't figured out how to
send a CTRL+C. I need this so I can kill a program that tends to get
hung.

Thanks!

Dec 7 '05 #1
3 2970

"mule" <tj**********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
hello all, I have a c# app that telnets into a router and issues a
series of commands. All works great except I haven't figured out how to
send a CTRL+C. I need this so I can kill a program that tends to get
hung.


http://www.ietf.org/rfc/rfc0854.txt

David
Dec 8 '05 #2
seems like you are doing a busy wait rather creating threads on the
connection. If you are not able to communicate with server then you should
be able to terminate thread by closing connection between client and server.
Ctrl+C is a shortcut for program to terminate (forceful kill) the
application as DOS is single threaded.
"mule" <tj**********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
hello all, I have a c# app that telnets into a router and issues a
series of commands. All works great except I haven't figured out how to
send a CTRL+C. I need this so I can kill a program that tends to get
hung.

Thanks!

Dec 8 '05 #3
Well the program that I'm telnetting to has been known to get hung,
even outside of a programmatic telnet session. So I'm really just
looking for a way to send a "break"

Dec 8 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Scott | last post: by
4 posts views Thread by praba kar | last post: by
2 posts views Thread by Zach Flynn | last post: by
2 posts views Thread by barry | last post: by
3 posts views Thread by s99999999s2003 | last post: by
3 posts views Thread by Daniel Clark | last post: by
5 posts views Thread by sui | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.