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
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
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
github
nhooyr
websocket
Commits
80ddbb42
Unverified
Commit
80ddbb42
authored
5 years ago
by
Anmol Sethi
Browse files
Options
Downloads
Patches
Plain Diff
Simplify some docs
parent
dd38de53
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
websocket.go
+4
-5
4 additions, 5 deletions
websocket.go
with
4 additions
and
5 deletions
websocket.go
+
4
−
5
View file @
80ddbb42
...
@@ -600,8 +600,7 @@ func (c *Conn) writer(ctx context.Context, typ MessageType) (io.WriteCloser, err
...
@@ -600,8 +600,7 @@ func (c *Conn) writer(ctx context.Context, typ MessageType) (io.WriteCloser, err
// Write is a convenience method to write a message to the connection.
// Write is a convenience method to write a message to the connection.
//
//
// See the Writer method if you want to stream a message. The docs on Writer
// See the Writer method if you want to stream a message.
// regarding concurrency also apply to this method.
func
(
c
*
Conn
)
Write
(
ctx
context
.
Context
,
typ
MessageType
,
p
[]
byte
)
error
{
func
(
c
*
Conn
)
Write
(
ctx
context
.
Context
,
typ
MessageType
,
p
[]
byte
)
error
{
_
,
err
:=
c
.
write
(
ctx
,
typ
,
p
)
_
,
err
:=
c
.
write
(
ctx
,
typ
,
p
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -876,9 +875,9 @@ func init() {
...
@@ -876,9 +875,9 @@ func init() {
// Ping sends a ping to the peer and waits for a pong.
// Ping sends a ping to the peer and waits for a pong.
// Use this to measure latency or ensure the peer is responsive.
// Use this to measure latency or ensure the peer is responsive.
// Ping must be called concurrently with Reader as
otherwise
it does
// Ping must be called concurrently with Reader as it does
// not read from the connection
and relies on Reader to unblock
// not read from the connection
but instead waits for a Reader call
//
when
the pong
arrives
.
//
to read
the pong.
//
//
// TCP Keepalives should suffice for most use cases.
// TCP Keepalives should suffice for most use cases.
func
(
c
*
Conn
)
Ping
(
ctx
context
.
Context
)
error
{
func
(
c
*
Conn
)
Ping
(
ctx
context
.
Context
)
error
{
...
...
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