473,320 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 3096

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Scott | last post by:
I am using a TCPIP connection to communicate over port 23 (telnet) to a server, and I am having to mimic normal command line interface you owuld see in a telnet session (i.e. I have to write to...
4
by: praba kar | last post by:
Dear All, Normally we can send mail using telnet in linux. In the following way telnet Ipaddress 25 mail from: raj@rajkumar.com 250 o.k(response of from commandline) rcpt to: test@oops.co.in...
2
by: Zach Flynn | last post by:
Ok, so I'm programming in Unix if that makes any difference. And I'm doing: system("telnet somehost.com 25"); But I can't figure out how to send a command to it. Like, for example, I would...
2
by: barry | last post by:
The code below is in a button but though there is no error message of any kind I am not getting the email which I am sending to myself. Any help would be appreciated. ...
3
by: s99999999s2003 | last post by:
hi i have a program that works very similar to tail -f in Unix It will need a Ctrl-C in order to break out of the program. I wish to run this program using python (either thru os.system() or some...
3
by: Daniel Clark | last post by:
I have a Windows command line based application that only shuts down cleanly if it sees "CTRL-C" on the console. I need to automate the running of this application, but still allow the user sitting...
0
by: ranishobha21 | last post by:
Dear All, I am sending the code below.i have not specifies the host name.i want to send command to server and get the response from it.but it doesnt work.when i connect with the telnet using ssh...
5
by: sui | last post by:
this is my code import sys, os, glob, datetime, time import smtplib ## Parameters for SMTP session port=587 SMTPserver= 'smtp.gmail.com' SMTPuser= '...@gmail.com' pw= 'fill in here'...
0
by: Graycon | last post by:
I am trying to reboot several devices on my private network through telnet. I wrote a vbs that does the operation but i cannot select any other window while it is running of the input will not go...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.