[muscle] Re: zlib encoding and muscled
- From: "Jeremy Friesner" <jaf@xxxxxxxxxxxx>
- To: muscle@xxxxxxxxxxxxx
- Date: Sun, 06 Jun 2004 19:53:59 PDT (-0700)
> Hi Wilson,
>
> > Very cool!
>
> Thanks! :^)
>
> > I don't see an obvious way to set the outgoing encoding to zlib for the
> > muscled server. Is it done automatically if I have
> > MUSCLE=3D5FMESSAGE=3D5FENCODING=3D5FZLIB defined=3D3F If so, how would I
> > specify an
> > encoding level=3D3F Do I need to modify the muscled server code=3D3F
>
> No need to modify the server code.
>
> > Also, how does a client notify the server that it'll accept zlib=3D3F I
> > see a a method MessageIOGateway::SetOutgoingEncoding(), but no such
> > method SetIncomingEncoding.
>
> I think the two questions above are both the same question, which is, "how to
> I get the muscle server to zlib-compress the Messages that it sends back to
> the client=3D3F". If I understood wrong, please let me know.
>
> In any case, here is how to tell the muscled server to zlib-compress the
> Messages that it sends to your client:
>
> int32 encodingLevel =3D3D 9; // 9 is maximum compression, 1 is minimum, etc.
> MessageRef msg =3D3D GetMessageFromPool(PR=3D5FCOMMAND=3D5FSETPARAMETERS);
> if ((msg())&&(msg()->AddInt32(PR=3D5FNAME=3D5FREPLY=3D5FENCODING,
> encodingLevel) =3D3D=3D3D B=3D5FNO=3D5FERROR))
> {
> // insert your code to send msg to the server here
> }
>
> -Jeremy
>
>
- References:
- [muscle] Re: zlib encoding and muscled
- From: Jeremy Friesner
Other related posts:
- » [muscle] zlib encoding and muscled
- » [muscle] Re: zlib encoding and muscled
- » [muscle] Re: zlib encoding and muscled
- » [muscle] Re: zlib encoding and muscled
- » [muscle] Re: zlib encoding and muscled
- [muscle] Re: zlib encoding and muscled
- From: Jeremy Friesner