How to terminate a telnet session from within your C/C++ program

M

Michael

Dear all,

Given the following challenge:
1. The application is an exe on a W2K server
2. User logs via telnet to the server
3. After checking the user account and password, a bat file runs
cmd.exe that starts the app.
4. The app starts looking for another instance of itself and if it was
found it will kill the instance (but not the telnet session that
originally started the instance as described in 1. to 3.)
5. Since the server allows only 2 telnet sessions, as a consequence,
the next log-in will be refused even there is only one or none
application.

I am looking for a piece of code that will be plugged into the app
and:
1. will not only look for aonther instance of itself but also for the
telnet session that has started the instance and kill this session.

I appreciate any help/hints you can give us,

Michael
 
A

Attila Feher

Michael said:
Dear all,

Given the following challenge:
1. The application is an exe on a W2K server
2. User logs via telnet to the server
3. After checking the user account and password, a bat file runs
cmd.exe that starts the app.
4. The app starts looking for another instance of itself and if it was
found it will kill the instance (but not the telnet session that
originally started the instance as described in 1. to 3.)
5. Since the server allows only 2 telnet sessions, as a consequence,
the next log-in will be refused even there is only one or none
application.

I am looking for a piece of code that will be plugged into the app
and:
1. will not only look for aonther instance of itself but also for the
telnet session that has started the instance and kill this session.

I appreciate any help/hints you can give us,

Hint: you are asking your question in the wrong newsgroup. This one is for
the C++ language and not the telnet protocol or socket programming.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top