Accessing a daemon
Printed From: Rocket Software
Category: AccuTerm Knowledge Base (read only)
Forum Name: Advanced Features
Forum Description: Private escape sequences, host integration using the AccuTerm Server and ObjectBridge
URL: https://forum.asent.com/forum_posts.asp?TID=1446
Printed Date: March 26 2026 at 8:51pm Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com
Topic: Accessing a daemon
Posted By: dynamic
Subject: Accessing a daemon
Date Posted: December 22 2008 at 7:09am
I'm new at a lot of this stuff and would appreciate some help. Hopefully I can explain what I am trying to accomplish. I have a program running in the background that is listening on a localhost TCP port ( I assign the port number ) that I would like to access from Accuterm. I have tested this prgram with the DOS telnet client and it performs correctly. The command that I need to send it is in three parts. First the command followed by a CR, Then parameter 1, and parameter 2 each follwerd by a CR. If the parameters are correct, it will open a display window.
Note: I tried to telnet into this program with an Accuterm session. It connected, but I could not get it to see the commands I was sending it. There was no echo back and it always gave me an invalid command response.
Thanks ahead of time for any help.
Andy
|
Replies:
Posted By: PSchellenbach
Date Posted: December 22 2008 at 9:28am
Hi Andy -
AccuTerm's telnet client follows the telnet protocol, which is more complex than simply passing a string to the server and getting a response. By default, the telnet protocol works in "text mode", and does not do local echo - the server needs to echo its input back to the client. You might be able to get a simple socket listener to work by tweaking the advanced telnet options in AccuTerm. First, enable Binary mode, bypass option negotiation, disable the Echo option, and set Duplex to Half. Don't send or return any strings that contain CHR(255).
Thanks,
Pete
|
Posted By: dynamic
Date Posted: December 23 2008 at 1:15am
Thanks Pete. That worked great. I can manually access the background program manually through a session. Do you have a way to access it through a program? I would like to create buttons that when clicked will perform tasks in that program. I know I need to open the port and send commands. I may or may not need to get a response. I'm really not sure where to start.
Andy
|
Posted By: PSchellenbach
Date Posted: December 23 2008 at 6:45am
Hi Andy -
You can use scripting to manipulate the Session object that is connected to your background server. Are you connected to a host system from another session? If so, you can invoke a script using an escape sequence from the host, and the script can communicate with the background server using the 2nd session.
Thanks,
Pete
|
Posted By: dynamic
Date Posted: December 29 2008 at 1:32am
Between this site and others as well as Accuterm help, I have written my first scripts. I check to see if there are two sessions open, if not, I open the hidden session. I then check for a connection to make sure the other program is running. If it isn't, I execute the command to start it up.
Brings up a last question: Can you have a script run when a session is closed? I would like to stop the background program when the Accuterm session is closed. It's not a huge deal, more of a curiosity.
Thanks, Andy
|
Posted By: homerlh
Date Posted: June 05 2009 at 4:11am
Hi Andy,
I have a client that wants AccuTerm to close when the user logs off. I had to modify the "OFF" and "EXIT" verbs of their flavor of pick to first execute an AccuTerm script then chain to the real "OFF" or "EXIT" verb. It worked great.
Larry Hazel
|
|