CompressionOptions class

Options controlling compression in a WebSocket.

A CompressionOptions instance can be passed to WebSocket.connect, or used in other similar places where WebSocket compression is configured.

In most cases the default compressionDefault is sufficient, but in some situations, it might be desirable to use different compression parameters, for example to preserve memory on small devices.

Constructors

CompressionOptions({bool clientNoContextTakeover = false, bool serverNoContextTakeover = false, int? clientMaxWindowBits, int? serverMaxWindowBits, bool enabled = true})
const

Properties

clientMaxWindowBitsint?
final
The maximal window size bit count requested by the client. [...]
clientNoContextTakeoverbool
final
Whether the client will reuse its compression instances.
enabledbool
final
Whether WebSocket compression is enabled. [...]
hashCodeint
read-only, inherited
The hash code for this object. [...]
runtimeTypeType
read-only, inherited
A representation of the runtime type of the object.
serverMaxWindowBitsint?
final
The maximal window size bit count requested by the server. [...]
serverNoContextTakeoverbool
final
Whether the server will reuse its compression instances.

Methods

noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed. [...]
toString() → String
inherited
A string representation of this object. [...]

Operators

operator ==(Object other) → bool
inherited
The equality operator. [...]

Constants

compressionDefault → const CompressionOptions
Default WebSocket compression configuration. [...]
compressionOff → const CompressionOptions
No-compression configuration. [...]
const CompressionOptions(enabled: false)
DEFAULT → const CompressionOptions
@Deprecated("Use compressionDefault instead")
compressionDefault
OFF → const CompressionOptions
@Deprecated("Use compressionOff instead")
compressionOff

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-io/CompressionOptions-class.html