RPCCompressor returns a ServerOption that sets a compressor for outbound messages. For backward compatibility, all outbound messages will be sent using this compressor, regardless of incoming message compression. By default, server messages will be sent using the same compressor with which request
(cp Compressor)
| 420 | // Deprecated: use encoding.RegisterCompressor instead. Will be supported |
| 421 | // throughout 1.x. |
| 422 | func RPCCompressor(cp Compressor) ServerOption { |
| 423 | return newFuncServerOption(func(o *serverOptions) { |
| 424 | o.cp = cp |
| 425 | }) |
| 426 | } |
| 427 | |
| 428 | // RPCDecompressor returns a ServerOption that sets a decompressor for inbound |
| 429 | // messages. It has higher priority than decompressors registered via |