Commit Graph

11 Commits

Author SHA1 Message Date
Canelo Hill a70cea529a
Update for deprecated ioutil package (#931) 2024-06-19 14:44:41 +10:00
apoorvajagtap ce903f6d1d Reverts to v1.5.0
This commit reverts the changes back till 8983b96324.
And inherits the README.md changes of 931041c5ee
Relates to:
- https://github.com/gorilla/websocket/issues/880#issuecomment-2081189055
2024-06-13 23:18:03 -04:00
apoorvajagtap 1bddf2e0db bumps go version & removes deprecated module usage 2024-05-01 18:51:54 +05:30
apoorvajagtap b2c246b2ec Revert " Update go version & add verification/testing tools (#840)"
This reverts commit 666c197fc9.
2024-05-01 18:51:54 +05:30
apoorvajagtap 09a6bab466 removing error handling while closing connections 2024-04-01 22:33:57 -04:00
merlin 4a5e66f763 make tests parallel 2024-01-21 22:46:55 -05:00
Corey Daley 666c197fc9
Update go version & add verification/testing tools (#840)
Fixes #

**Summary of Changes**

1.
2. 
3.

> PS: Make sure your PR includes/updates tests! If you need help with
this part, just ask!
2023-08-27 01:31:45 +05:30
Steven Scott b378caee5b Add write buffer pooling
Add WriteBufferPool to Dialer and Upgrader. This field specifies a pool
to use for write operations on a connection.  Use of the pool can reduce
memory use when there is a modest write volume over a large number of
connections.

Use larger of hijacked buffer and buffer allocated for connection (if
any) as buffer for building handshake response. This decreases possible
allocations when building the handshake response.

Modify bufio reuse test to call Upgrade instead of the internal
newConnBRW. Move the test from conn_test.go to server_test.go because
it's a serer test.

Update newConn and newConnBRW:

- Move the bufio "hacks" from newConnBRW to separate functions and call
these functions directly from Upgrade.
- Rename newConn to newTestConn and move to conn_test.go. Shorten
argument list to common use case.
- Rename newConnBRW to newConn.
- Add pool code to newConn.
2018-08-22 14:11:59 -07:00
Gary Burd b0dc45572b Change default and add API for compression level
Change the default compression level to 1. This level is faster and uses
less memory.

Add Conn.SetCompressionLevel API to allow applications to tune
compression on a per message basis.
2017-01-19 11:00:23 -08:00
Alexandr Emelin 34e053563d benchmarks for write with compression enabled/disabled 2017-01-13 12:06:51 +03:00
Gary Burd a87eae1d6f Add hooks to support RFC 7692 (per-message compression extension)
Add newCompressionWriter and newDecompressionReader fields to Conn. When
not nil, these functions are used to create a compression/decompression
wrapper around an underlying message writer/reader.

Add code to set and check for RSV1 frame header bit.

Add functions compressNoContextTakeover and decompressNoContextTakeover
for creating no context takeover wrappers around an underlying message
writer/reader.

Work remaining:

- Add fields to Dialer and Upgrader for specifying compression options.
- Add compression negotiation to Dialer and Upgrader.
- Add function to enable/disable write compression:

    // EnableWriteCompression enables and disables write compression of
    // subsequent text and binary messages. This function is a noop if
    // compression was not negotiated with the peer.
    func (c *Conn) EnableWriteCompression(enable bool) {
            c.enableWriteCompression = enable
    }
2016-06-29 17:03:55 -07:00