mirror of https://github.com/gorilla/websocket.git
Add code snippet for EnableCompression in doc.go, change EnableWriteCompression()'s parameter to false since enableWriteCompression is true by default.
This commit is contained in:
parent
4e4c8d08b4
commit
1025138dad
14
doc.go
14
doc.go
|
@ -156,14 +156,20 @@
|
||||||
// Per message compression extensions (RFC 7692) are experimentally supported
|
// Per message compression extensions (RFC 7692) are experimentally supported
|
||||||
// by this package in a limited capacity. Setting the EnableCompression option
|
// by this package in a limited capacity. Setting the EnableCompression option
|
||||||
// to true in Dialer or Upgrader will attempt to negotiate per message deflate
|
// to true in Dialer or Upgrader will attempt to negotiate per message deflate
|
||||||
// support. If compression was successfully negotiated with the connection's
|
// support.
|
||||||
// peer, any message received in compressed form will be automatically
|
//
|
||||||
// decompressed. All Read methods will return uncompressed bytes.
|
// var upgrader = websocket.Upgrader{
|
||||||
|
// EnableCompression: true,
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// If compression was successfully negotiated with the connection's peer, any
|
||||||
|
// message received in compressed form will be automatically decompressed.
|
||||||
|
// All Read methods will return uncompressed bytes.
|
||||||
//
|
//
|
||||||
// Per message compression of messages written to a connection can be enabled
|
// Per message compression of messages written to a connection can be enabled
|
||||||
// or disabled by calling the corresponding Conn method:
|
// or disabled by calling the corresponding Conn method:
|
||||||
//
|
//
|
||||||
// conn.EnableWriteCompression(true)
|
// conn.EnableWriteCompression(false)
|
||||||
//
|
//
|
||||||
// Currently this package does not support compression with "context takeover".
|
// Currently this package does not support compression with "context takeover".
|
||||||
// This means that messages must be compressed and decompressed in isolation,
|
// This means that messages must be compressed and decompressed in isolation,
|
||||||
|
|
Loading…
Reference in New Issue