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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUDs
. -> [Folder]  MUD Design Concepts
. . -> [Subject]  mccp and copyover

mccp and copyover

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Lilmike   USA  (3 posts)  [Biography] bio
Date Tue 15 Apr 2014 05:06 AM (UTC)
Message
Hi all,
I was implementing mccp in my mud, and I've got it mostly working. Now the only problem is restarting mccp on copyover/hotreboot. I have the flag for mccp saving in the copyover file, but there is an error in most mud clients that support mccp I've tried, even before the copyover happens.
Basically what happens is this:
1. someone initiates a copyover.
2. the mud turns off the compression for each player that has it on, and saves that data, along with any other necessary data, into the copyover file.
3. The mud reboots, and reads in the data for each player.
4. The mud turns back on compression for those that support it.
The only problem here is at steps 2 and 4. At 2, the mud successfully turns off the compression, at least according to tt++, but then any client I've tried that supports compression says there's a compression error even before the mud reboots and turns back on compression.
At 4, the mud turns back on compression so in the case of tt++ or any other client that doesn't immediately kick you off after a compression error shows jibberish. On mushclient, it shows an error, compression error, invalid header check, and then kicks you off.
But, my mud seems to be successfully turning off mccp because:
It sends the data 'mccp disabled' with the z_finish flag with zlib, and mushclient gets that fine, and sends it to the player.
Then the next data is uncompressed, but this is where mushclient says compression error, even though the data is not compressed. In tintin++ it says compression error right before the line 'copyover initiated by xxx', which is not compressed, but it seems to think it is.
Anyone know what could be going on here?
Thanks,
-Michael.
[Go to top] top

Posted by Dentin   (12 posts)  [Biography] bio
Date Reply #1 on Tue 15 Apr 2014 01:26 PM (UTC)
Message
I don't have an answer for you, but from what you've said it's pretty clear that the problem is in the MCCP disable. Try adding a temporary 'mccp on/off' command to allow manual disable and enable of MCCP while the game is running, and make sure you can do multiple enable/disable pairs on a single connection. I'm guessing that right now, you can't.

Once you get it working that way, it should be fine for copyover.
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Wed 16 Apr 2014 08:03 PM (UTC)
Message
Try flushing the output buffer. I have a feeling that there can be problems with switching from compressed to decompressed in a single packet.

- Nick Gammon

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

Posted by Lilmike   USA  (3 posts)  [Biography] bio
Date Reply #3 on Wed 16 Apr 2014 08:17 PM (UTC)
Message
Hey Nick,
I believe that's what I'm doing, but I'll go back and check.
Basically how I do it is have a field in the socket called compression, and it is in the range 0 to 3. If it's 0, that means no compression is happening. If it's 1, then compression is happening. if it's 2, that means compression is happening, but it should stop happening on the next flush (which actually happens as soon as it sets it to 2), and if it's 3, it should start compression on the next flush.
-Michael.
[Go to top] top

Posted by Lilmike   USA  (3 posts)  [Biography] bio
Date Reply #4 on Thu 17 Apr 2014 03:55 PM (UTC)
Message
Hi all,
I got it working, it had to do with how the code was being called and the prompt. I moved the functions into another file and made a command to turn on and off compression, and that gave me the hint as to where it was.
Thanks!
-Michael.
[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.


15,930 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at HostDash]