[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Interactive 'Keep-Alive'

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Interactive 'Keep-Alive'
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please)
Maximum of 6000 characters. Text only please, no HTML.
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Sun 19 Nov 2006 07:07 PM (UTC)  quote  ]
Message
See this post:

http://www.gammon.com.au/forum/?id=7488

This does a similar thing, and if you altered it slightly to make the timer function actually send something to keep it connected, then it does exactly what you want.

Or, add another timer that sends some sort of "keep alive" command which fires every couple of minutes.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Thu 09 Nov 2006 05:59 AM (UTC)  quote  ]
Message
Yes, that is pretty easy to do.

You could make a plugin, and in it put a handler for OnPluginCommandEntered. In that you could remember the time of the last command actually typed (for going AFK).

Then you could make a timer that checks the time now, compared to the time of the last command. That timer could fire every minute. Of course, the same timer can send something to keep the connection alive as well.

In fact, you can use OnPluginSent to find the last time something was sent to the MUD, and thus not send your "keep alive" if something else was sent recently.

I don't know about the dialog box, because it would sit there waiting for you to press OK, and thus not drop the connection. But, you could play a sound, display a message in red, and if you don't type anything in the next minute, drop the connection. Of course, typing anything should cancel the timeout anyway. Thus all you really need to do is something like, at > 60 minutes but < 61 minutes, display the message, and > 61 minutes, drop the connection.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Drraagh   (4 posts)  [Biography] bio
Date Thu 09 Nov 2006 05:11 AM (UTC)  quote  ]
Message
There's one thing I've noticed with my connection to certain MU*s, no matter what client I use, and no matter how I toy with the settings of my connection. That is that I get a connection that freezes unless there is data regularlly sent on the line. ON one, I did a series of Semaphores on my character which still allows me to idle out if I go AFK or whatever, but on others I can't get that set up due to whatever restrictions they have.

My workaround for that is for me to send a trigger message to the server every five minutes. Not the prettiest, but something that works. The problem is, that I go AFK and my connection could still go for hours. I haven't looked at scripting yet as the idea just hit me, but I am just wondering if the idea is possible given the system in place before I go looking.

What I want to have is a script that times when I log on, runs some sort of idle keep-alive, but every hour or so (the usual idle-out time for MUs), my client prompts me for some interaction before cutting the connection. My Dial up connection back so long ago used to do that with a popup I had to click OK to or it would disconnect.

I'm going to start researching scripting for other ideas I had, but for this one, I am mainly concerned if it's possible before I start spending time working on it for nothing.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


1,764 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]