good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
websocket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
websocket
Commits
38219393
Unverified
Commit
38219393
authored
5 years ago
by
Anmol Sethi
Browse files
Options
Downloads
Patches
Plain Diff
Get CI passing
parent
9925b643
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+5
-4
5 additions, 4 deletions
README.md
websocket.go
+435
-414
435 additions, 414 deletions
websocket.go
with
440 additions
and
418 deletions
README.md
+
5
−
4
View file @
38219393
...
...
@@ -8,7 +8,7 @@ websocket is a minimal and idiomatic WebSocket library for Go.
## Install
```
bash
go get nhooyr.io/websocket
go get nhooyr.io/websocket
@v1.0.0
```
## Features
...
...
@@ -19,7 +19,7 @@ go get nhooyr.io/websocket
-
Thorough tests, fully passes the
[
autobahn-testsuite
](
https://github.com/crossbario/autobahn-testsuite
)
-
Zero dependencies outside of the stdlib for the core library
-
JSON and ProtoBuf helpers in the wsjson and wspb subpackages
-
High
performance, memory reuse
by default
-
High
ly optimized
by default
-
Concurrent writes out of the box
## Roadmap
...
...
@@ -129,8 +129,9 @@ gorilla/websocket requires you to constantly read from the connection to respond
even if you don't expect the peer to send any messages.
In terms of performance, the differences depend on your application code. nhooyr/websocket
reuses buffers efficiently out of the box whereas gorilla/websocket does not. As mentioned
above, it also supports concurrent writers out of the box.
reuses buffers efficiently out of the box if you use the wsjson and wspb subpackages whereas
gorilla/websocket does not. As mentioned above, nhooyr/websocket also supports concurrent
writers out of the box.
The only performance con to nhooyr/websocket is that uses two extra goroutines. One for
reading pings, pongs and close frames async to application code and another to support
...
...
This diff is collapsed.
Click to expand it.
websocket.go
+
435
−
414
View file @
38219393
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment