good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 80ddbb42 authored by Anmol Sethi's avatar Anmol Sethi
Browse files

Simplify some docs

parent dd38de53
No related branches found
No related tags found
No related merge requests found
...@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment