 |
Kobold Newbie
Joined: 03 Mar 2011 Posts: 4
|
Posted: Thu Mar 03, 2011 3:37 am
SO_KEEPALIVE option? |
First, thanks for creating CMUD. I just bought my copy today.
I read here that CMUD offers SO_KEEPALIVE: http://www.zuggsoft.com/page.php?p=cmud&file=cmud/version.htm
However, I don't know where to find it. It's important to me since my NAT seems aggressive about kicking off idle connections, and creating an unidle timer with #ALARM is a bit messy. I know it's the router kicking me off and not the MUSH since I also keep a screen/tf connection open to the MUSH (from my VPS) and that doesn't disconnect me for idleness.
It's also possible that CMUD has already enabled SO_KEEPALIVE, but has not adjusted the keep-alive intervals low enough to satisfy my NAT. See here: http://msdn.microsoft.com/en-us/library/dd877220(VS.85).aspx |
|
|
 |
orphean Apprentice

Joined: 21 Oct 2008 Posts: 147 Location: Olympia, WA
|
Posted: Thu Mar 03, 2011 5:01 am |
Welcome to CMUD!
CMUD does offer it. I'm pretty sure it's enabled by default but you can check by opening the Preferences window for your session. Then choose the Network sidetab, followed by the Connection tab. In there you should see a checkbox titled 'Set KeepAlive for network socket'. If that's checked than CMUD is setting that on the socket it's using to connect to the mud.
As to the intervals I don't think there is a user exposed way of modifying whatever CMUD is using. I'm not even sure if CMUD uses the win32 api for it's socket library for that matter so the particulars themselves might be slightly different.
So if that box is checked and it's still happening then I think you might be stuck. Now it might be exposed via the %pref() function and just named in a way that doesn't make it clear that it relates to KeepAlive. It seems to me the %pref() function would be an easy way for Zugg to expose it if that's what he chooses to do.
I think we need to wait for an official answer or at least someone more knowledgable about the networking implementation than I am. |
|
|
 |
Kobold Newbie
Joined: 03 Mar 2011 Posts: 4
|
Posted: Thu Mar 03, 2011 8:42 am |
Thanks, I totally missed the whole Prefs dialog window. I kept looking under settings and wondering why it was so bare!
That option IS checked for me. I guess worst comes to worst, I can adjust the global Windows registry option related to how often keep-alives are sent, but it'd be nice if it was adjustable. The Windows default is ridiculous (every two hours). |
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4734 Location: Pensacola, FL, USA
|
Posted: Thu Mar 03, 2011 12:14 pm |
the alarm is only messy if you have it entering a command to the game... try sending a backspace: %char(8)
|
|
_________________ Discord: Shalimarwildcat |
|
|
 |
Kobold Newbie
Joined: 03 Mar 2011 Posts: 4
|
Posted: Thu Mar 03, 2011 10:38 pm |
shalimar wrote: |
the alarm is only messy if you have it entering a command to the game... try sending a backspace: %char(8) |
Great idea! Thanks. I'll look in my MU's source code too to see if there's any other non-printing sequences I can send. |
|
|
 |
|
|