Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUDs
➜ MUD Design Concepts
➜ mccp and copyover
Posting of new messages is disabled at present.
Refresh page
Posted by
| Lilmike
USA (3 posts) 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. | Top |
|
Posted by
| Dentin
(12 posts) 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. | Top |
|
Posted by
| Nick Gammon
Australia (23,122 posts) 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 | Top |
|
Posted by
| Lilmike
USA (3 posts) 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. | Top |
|
Posted by
| Lilmike
USA (3 posts) 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. | 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.
17,570 views.
Posting of new messages is disabled at present.
Refresh page
top