Hey guys,
I have been engaged in the creation of a mud engine from scratch. I started with tinymudserver v2. The project is reasonably far along now.
My question though is about implementing MCCP. I recently decided to investigate adding support for this protocol but unlike other protocols (MXP and MSP) there are no really easy to use guides to implementing them. I don't really want to have to reverse engineer my solution from other mud's snippets too.
As far as I can tell, all you have to do (from the MUD's perspective) is the following:
Send IAC WILL COMPRESS and IAC WILL COMPRESS2, and listen for the response (IAC DO COMPRESS / IAC DO COMPRESS2 or IAC DONT COMPRESS / IAC DONT COMPRESS2).
Once we have this response, we prepend all compress output to the user with:
IAC SB COMPRESS SE or IAC SB COMPRESS2 SE.
Then we run the zlib function "deflate" on the data, send that to the user, followed by Z_STREAM_END.
Is that it? Am I missing something, or doing something above incorrectly? Note that I haven't actually attempted to do the above yet - I'm a firm believer in having a design first before implementing something so this is part of my research and design phase.
As best as I can infer from reading other sources, that's all I need to do. But some of the snippets I've seen to do this stuff are incredibly long and complicate...I wonder whether I'm not leaving something out?
Any help appreciated.
Cheers.
I have been engaged in the creation of a mud engine from scratch. I started with tinymudserver v2. The project is reasonably far along now.
My question though is about implementing MCCP. I recently decided to investigate adding support for this protocol but unlike other protocols (MXP and MSP) there are no really easy to use guides to implementing them. I don't really want to have to reverse engineer my solution from other mud's snippets too.
As far as I can tell, all you have to do (from the MUD's perspective) is the following:
Send IAC WILL COMPRESS and IAC WILL COMPRESS2, and listen for the response (IAC DO COMPRESS / IAC DO COMPRESS2 or IAC DONT COMPRESS / IAC DONT COMPRESS2).
Once we have this response, we prepend all compress output to the user with:
IAC SB COMPRESS SE or IAC SB COMPRESS2 SE.
Then we run the zlib function "deflate" on the data, send that to the user, followed by Z_STREAM_END.
Is that it? Am I missing something, or doing something above incorrectly? Note that I haven't actually attempted to do the above yet - I'm a firm believer in having a design first before implementing something so this is part of my research and design phase.
As best as I can infer from reading other sources, that's all I need to do. But some of the snippets I've seen to do this stuff are incredibly long and complicate...I wonder whether I'm not leaving something out?
Any help appreciated.
Cheers.