Commit Graph

24 Commits

Author SHA1 Message Date
LiuYang 80393295c1
Correct way to save memory using write buffer pool and freeing net.http default buffers (#761)
**Summary of Changes**

1. Add an example that uses the write buffer pool

The loop process of the websocket connection is inner the http handler
at existing examples, This usage will cause the 8k buffer(4k read buffer
+ 4k write buffer) allocated by net.http can't be GC(Observed by heap
profiling, see picture below) . The purpose of saving memory is not
achieved even if the WriteBufferPool is used.

In example bufferpool, server process websocket connection in a new
goroutine, and the goroutine created by the net.http will exit, then the
8k buffer will be GC.


![heap](https://user-images.githubusercontent.com/12793501/148676918-872d1a6d-ce10-4146-ba01-7de114db09f5.png)

Co-authored-by: hakunaliu <hakunaliu@tencent.com>
Co-authored-by: Corey Daley <cdaley@redhat.com>
2023-08-17 11:25:09 -04:00
Corey Daley 931041c5ee
Update README.md
Signed-off-by: Corey Daley <cdaley@redhat.com>
2023-07-15 10:54:14 -04:00
Matt Silverlock 76ecc29eff
archive mode 2022-12-09 11:03:16 -05:00
Gary Burd 2f25f7843d
Update README (#757)
- Note that a new maintainer is needed.
- Remove comparison with x/net/websocket. There's no need to describe
  the issues with that package now that the package's documentation
  points people here and elsewhere.
2022-01-03 17:49:10 -08:00
prophecy 836e821143
Changed the link of API references to pkg.go.dev (#577) 2020-03-19 06:46:16 -07:00
Matt Silverlock ae1634f6a9
Create CircleCI config.yml (#519)
* Create config.yml
* Delete .travis.yml
* Added CircleCI badge to README
* Add golint; run on latest only
2019-06-29 11:55:28 -07:00
Jürgen Etzlstorfer 80c2d40e9b fix autobahn test suite link (#503) 2019-04-26 23:03:06 -05:00
Ankur Gupta 95ba29eb98 Updated autobahn test suite URL
Fixes #436
2018-12-05 23:02:39 -08:00
Carter Jones 6656ddce91 add newline and remove extra space 2018-03-04 15:22:45 -08:00
Gary Burd 0b847f2fac Update README.md 2016-10-21 12:35:05 -07:00
Artyom Pervukhin 99ffb988ce Update README to reflect change of Go sub-repo websocket feature
Closes #164
2016-10-17 11:17:13 +03:00
Gary Burd f9219095ab Add command example 2015-10-18 13:32:14 -07:00
Gary Burd d051d29231 Add client and server example 2015-09-23 15:23:26 -07:00
Gary Burd f761cdb666 Update README to use new path for Go sub-repos. 2014-11-10 09:56:46 -08:00
Attila Oláh d9b6ff71d6 fix typo in README.md 2014-11-03 16:02:20 +01:00
Gary Burd 95caf726f7 Update README.md
typos
2014-06-05 13:56:06 -07:00
Gary Burd 6afc23d053 Improve readme. 2014-06-03 15:01:48 -07:00
Gary Burd d832908d2b Add note about Chrome message fragmentation to readme 2014-06-03 14:47:02 -07:00
Gary Burd db1c080f90 Improve readme. 2014-04-20 21:48:25 -07:00
Gary Burd 82a29af075 Update readme files
- Improve comparison with go.net package.
- Improve autobahn server description.
2014-04-20 21:14:06 -07:00
Gary Burd f5c69ea9ed Improve comparison with other packages in readme. 2014-04-19 07:16:39 -07:00
Gary Burd 03206ef31e Various improvements to README files. 2014-03-20 13:26:28 -07:00
Gary Burd 2903ebc236 Add more information to README.md. 2013-10-29 06:31:06 -07:00
Gary Burd 273ecadfca Initial commit 2013-10-16 16:30:59 -07:00